<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Putting Text Into the Windows Clipboard</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2004/12/02/putting-text-into-the-windows-clipboard/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2004/12/02/putting-text-into-the-windows-clipboard/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Wed, 08 Feb 2012 16:01:55 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/12/02/putting-text-into-the-windows-clipboard/#comment-35981</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Thu, 06 Nov 2008 20:16:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=900#comment-35981</guid>
		<description>&lt;p&gt;Hey Fred.  Did you give me some books to take home to my boy?  He loved them, so thanks if that was you.&lt;/p&gt;
&lt;p&gt;You need the GetFromClipboard and GetText methods.  Here&#039;s what I came up with:&lt;/p&gt;
&lt;div style=&quot;overflow: auto; white-space: nowrap;&quot; class=&quot;codecolorer-container vb default&quot;&gt;&lt;div style=&quot;white-space: nowrap;&quot; class=&quot;vb codecolorer&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt; DecodeL()&lt;br&gt;
&#160; &#160; &lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; doClip &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; DataObject&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; sText &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; vaLines &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Variant&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; vaCells &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Variant&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; i &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;, j &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; sFormula &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Set&lt;/span&gt; doClip = &lt;span class=&quot;kw1&quot;&gt;New&lt;/span&gt; DataObject&lt;br&gt;
&#160; &#160; &lt;br&gt;
&#160; &#160; doClip.GetFromClipboard&lt;br&gt;
&#160; &#160; sText = doClip.GetText&lt;br&gt;
&#160; &#160; &lt;br&gt;
&#160; &#160; vaLines = Split(sText, vbNewLine)&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt; i = &lt;span class=&quot;kw1&quot;&gt;LBound&lt;/span&gt;(vaLines) &lt;span class=&quot;kw1&quot;&gt;To&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;UBound&lt;/span&gt;(vaLines)&lt;br&gt;
&#160; &#160; &#160; &#160; vaCells = Split(vaLines(i), &lt;span class=&quot;st0&quot;&gt;&quot;:&quot;&lt;/span&gt;)&lt;br&gt;
&#160; &#160; &#160; &#160; sFormula = &lt;span class=&quot;st0&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt; j = 1 &lt;span class=&quot;kw1&quot;&gt;To&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;UBound&lt;/span&gt;(vaCells)&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; sFormula = sFormula &amp; vaCells(j) &amp; &lt;span class=&quot;st0&quot;&gt;&quot;:&quot;&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt; j&lt;br&gt;
&#160; &#160; &#160; &#160; sFormula = Left$(sFormula, Len(sFormula) - 1)&lt;br&gt;
&#160; &#160; &#160; &#160; Sheet1.Range(vaCells(0)).Formula = sFormula&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt; i&lt;br&gt;
&#160; &#160; &lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Set&lt;/span&gt; doClip = &lt;span class=&quot;kw1&quot;&gt;Nothing&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
</description>
		<content:encoded><![CDATA[<p>Hey Fred.  Did you give me some books to take home to my boy?  He loved them, so thanks if that was you.</p>
<p>You need the GetFromClipboard and GetText methods.  Here&#8217;s what I came up with:</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer"><span class="kw1">Sub</span> DecodeL()<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="kw1">Dim</span> doClip <span class="kw1">As</span> DataObject<br />
&nbsp; &nbsp; <span class="kw1">Dim</span> sText <span class="kw1">As</span> <span class="kw1">String</span><br />
&nbsp; &nbsp; <span class="kw1">Dim</span> vaLines <span class="kw1">As</span> <span class="kw1">Variant</span><br />
&nbsp; &nbsp; <span class="kw1">Dim</span> vaCells <span class="kw1">As</span> <span class="kw1">Variant</span><br />
&nbsp; &nbsp; <span class="kw1">Dim</span> i <span class="kw1">As</span> <span class="kw1">Long</span>, j <span class="kw1">As</span> <span class="kw1">Long</span><br />
&nbsp; &nbsp; <span class="kw1">Dim</span> sFormula <span class="kw1">As</span> <span class="kw1">String</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="kw1">Set</span> doClip = <span class="kw1">New</span> DataObject<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; doClip.GetFromClipboard<br />
&nbsp; &nbsp; sText = doClip.GetText<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; vaLines = Split(sText, vbNewLine)<br />
&nbsp; &nbsp; <span class="kw1">For</span> i = <span class="kw1">LBound</span>(vaLines) <span class="kw1">To</span> <span class="kw1">UBound</span>(vaLines)<br />
&nbsp; &nbsp; &nbsp; &nbsp; vaCells = Split(vaLines(i), <span class="st0">&#8220;:&#8221;</span>)<br />
&nbsp; &nbsp; &nbsp; &nbsp; sFormula = <span class="st0">&#8220;&#8221;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">For</span> j = 1 <span class="kw1">To</span> <span class="kw1">UBound</span>(vaCells)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sFormula = sFormula &amp; vaCells(j) &amp; <span class="st0">&#8220;:&#8221;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Next</span> j<br />
&nbsp; &nbsp; &nbsp; &nbsp; sFormula = Left$(sFormula, Len(sFormula) &#8211; 1)<br />
&nbsp; &nbsp; &nbsp; &nbsp; Sheet1.Range(vaCells(0)).Formula = sFormula<br />
&nbsp; &nbsp; <span class="kw1">Next</span> i<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="kw1">Set</span> doClip = <span class="kw1">Nothing</span><br />
&nbsp; &nbsp; <br />
<span class="kw1">End</span> <span class="kw1">Sub</span></div>
</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred Cumming</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/12/02/putting-text-into-the-windows-clipboard/#comment-35956</link>
		<dc:creator>Fred Cumming</dc:creator>
		<pubDate>Wed, 05 Nov 2008 23:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=900#comment-35956</guid>
		<description>&lt;p&gt;Hi Dick&lt;/p&gt;
&lt;p&gt;I was at the User Conference in Sydney earlier this year.  I had a great time.&lt;/p&gt;
&lt;p&gt;I used your DataObject idea to write some VBA that gets the formulae from a selection of cells and pastes them to the clipboard.&lt;/p&gt;
&lt;p&gt;The reason I want to do this is so that I can paste them to my email program for transmission to text based Lists like Excel-L.&lt;/p&gt;
&lt;p&gt;The output looks like this :-&lt;/p&gt;
&lt;p&gt;$A$1:door A&lt;br&gt;
$B$1:door B&lt;br&gt;
$C$1:door C&lt;br&gt;
$D$1:Initial Choice&lt;br&gt;
$E$1:No Switch&lt;br&gt;
$F$1:Switch&lt;br&gt;
$A$2:=RANDBETWEEN(0,1)&lt;br&gt;
$B$2:=IF(A2=0,RANDBETWEEN(0,1),0)&lt;br&gt;
$C$2:=IF(SUM(A2:B2)=0,1,0)&lt;br&gt;
$D$2:=CHOOSE(RANDBETWEEN(1,3),&quot;A&quot;,&quot;B&quot;,&quot;C&quot;)&lt;br&gt;
$E$2:=IF(INDIRECT(D2&amp;ROW())0,&quot;Win&quot;,&quot;Lose&quot;)&lt;br&gt;
$F$2:=IF(E2=&quot;Win&quot;,&quot;Lose&quot;,&quot;Win&quot;)&lt;br&gt;
$H$8:switch wins&lt;br&gt;
$I$8:=COUNTIF(F:F,&quot;Win&quot;)&lt;br&gt;
$J$8:=I8/SUM(I8:I9)&lt;br&gt;
$K$8:=NOW()&lt;br&gt;
$H$9:noswitch wins&lt;br&gt;
$I$9:=COUNTIF(E:E,&quot;Win&quot;)&lt;br&gt;
$J$9:=I9/SUM(I8:I9)&lt;/p&gt;
&lt;p&gt;Now I need to write a little decoder routine that gets data from the clipboard and builds a sheet based on these formulae.&lt;/p&gt;
&lt;p&gt;I can do this by pasting to a sheet, importing the new range as an array and then processing the array but that seems a bit clumsy.&lt;/p&gt;
&lt;p&gt;Can I user the DataObject to GET stuff from the clipboard as well?  Or is there some other trick I need to know!&lt;/p&gt;
&lt;p&gt;Cheers&lt;br&gt;
fred&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Dick</p>
<p>I was at the User Conference in Sydney earlier this year.  I had a great time.</p>
<p>I used your DataObject idea to write some VBA that gets the formulae from a selection of cells and pastes them to the clipboard.</p>
<p>The reason I want to do this is so that I can paste them to my email program for transmission to text based Lists like Excel-L.</p>
<p>The output looks like this :-</p>
<p>$A$1:door A<br />
$B$1:door B<br />
$C$1:door C<br />
$D$1:Initial Choice<br />
$E$1:No Switch<br />
$F$1:Switch<br />
$A$2:=RANDBETWEEN(0,1)<br />
$B$2:=IF(A2=0,RANDBETWEEN(0,1),0)<br />
$C$2:=IF(SUM(A2:B2)=0,1,0)<br />
$D$2:=CHOOSE(RANDBETWEEN(1,3),&#8221;A&#8221;,&#8221;B&#8221;,&#8221;C&#8221;)<br />
$E$2:=IF(INDIRECT(D2&amp;ROW())0,&#8221;Win&#8221;,&#8221;Lose&#8221;)<br />
$F$2:=IF(E2=&#8221;Win&#8221;,&#8221;Lose&#8221;,&#8221;Win&#8221;)<br />
$H$8:switch wins<br />
$I$8:=COUNTIF(F:F,&#8221;Win&#8221;)<br />
$J$8:=I8/SUM(I8:I9)<br />
$K$8:=NOW()<br />
$H$9:noswitch wins<br />
$I$9:=COUNTIF(E:E,&#8221;Win&#8221;)<br />
$J$9:=I9/SUM(I8:I9)</p>
<p>Now I need to write a little decoder routine that gets data from the clipboard and builds a sheet based on these formulae.</p>
<p>I can do this by pasting to a sheet, importing the new range as an array and then processing the array but that seems a bit clumsy.</p>
<p>Can I user the DataObject to GET stuff from the clipboard as well?  Or is there some other trick I need to know!</p>
<p>Cheers<br />
fred</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gerardo Portillo</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/12/02/putting-text-into-the-windows-clipboard/#comment-32126</link>
		<dc:creator>Gerardo Portillo</dc:creator>
		<pubDate>Wed, 30 Apr 2008 20:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=900#comment-32126</guid>
		<description>&lt;p&gt;thanks, thats helps me a lot!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>thanks, thats helps me a lot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: www.cubetoon.com » Blog Archive » Acquiring data from MS Excel using DDE</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/12/02/putting-text-into-the-windows-clipboard/#comment-25245</link>
		<dc:creator>www.cubetoon.com » Blog Archive » Acquiring data from MS Excel using DDE</dc:creator>
		<pubDate>Mon, 02 Jul 2007 09:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=900#comment-25245</guid>
		<description>&lt;p&gt;[...] to the Daily Dose of Excel where I found the required tip to add only text to the clipboard. My initial attempt to just copy [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] to the Daily Dose of Excel where I found the required tip to add only text to the clipboard. My initial attempt to just copy [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Jorgensen</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/12/02/putting-text-into-the-windows-clipboard/#comment-16696</link>
		<dc:creator>Peter Jorgensen</dc:creator>
		<pubDate>Sun, 09 Oct 2005 08:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=900#comment-16696</guid>
		<description>&lt;p&gt;I found a solution for access.... you can still read the Forms 2.0 library, it&#039;s just not available by default in Access because access has its own forms library. Simply pull up the references and hit the browse button, and at C:WindowsSystem32FM20.DLL, it will be in the references list and you can access the DataObject perfectly. Solved a problem for me :).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I found a solution for access&#8230;. you can still read the Forms 2.0 library, it&#8217;s just not available by default in Access because access has its own forms library. Simply pull up the references and hit the browse button, and at C:WindowsSystem32FM20.DLL, it will be in the references list and you can access the DataObject perfectly. Solved a problem for me <img src='http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sudhan</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/12/02/putting-text-into-the-windows-clipboard/#comment-15666</link>
		<dc:creator>Sudhan</dc:creator>
		<pubDate>Sat, 06 Aug 2005 11:02:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=900#comment-15666</guid>
		<description>&lt;p&gt;Great solution..&lt;br&gt;
I have a problem associated with this case..&lt;br&gt;
When i copy a cell and paste it in a range it gets pasted for the first time and from the next time onwards it does not get pasted..&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Great solution..<br />
I have a problem associated with this case..<br />
When i copy a cell and paste it in a range it gets pasted for the first time and from the next time onwards it does not get pasted..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/12/02/putting-text-into-the-windows-clipboard/#comment-11314</link>
		<dc:creator>Stephen</dc:creator>
		<pubDate>Thu, 21 Apr 2005 18:52:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=900#comment-11314</guid>
		<description>&lt;p&gt;Someone on Experts-Exchange recommended this.  This works for Excel, but any idea as to how to get it to work for Access 2002?  I can&#039;t find that object library listed in the VBA references for Access.  Is there a way to import it from the Excel references?  Any ideas?  Or another way to do this in Access?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Someone on Experts-Exchange recommended this.  This works for Excel, but any idea as to how to get it to work for Access 2002?  I can&#8217;t find that object library listed in the VBA references for Access.  Is there a way to import it from the Excel references?  Any ideas?  Or another way to do this in Access?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Larry</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/12/02/putting-text-into-the-windows-clipboard/#comment-2787</link>
		<dc:creator>Larry</dc:creator>
		<pubDate>Sat, 04 Dec 2004 18:20:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=900#comment-2787</guid>
		<description>&lt;p&gt;Dick,&lt;br&gt;
   You are a God-send!  I have been struggling with copying text from Excel to the clipboard (so that it could be pasted into a database application query) and had been totally unsuccessful until I read your post.  I modified it to examine the active sheet and then to grab the information from the Selection object.  Works beautifully!&lt;/p&gt;
&lt;p&gt;Kudos!&lt;br&gt;
Larry&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Dick,<br />
   You are a God-send!  I have been struggling with copying text from Excel to the clipboard (so that it could be pasted into a database application query) and had been totally unsuccessful until I read your post.  I modified it to examine the active sheet and then to grab the information from the Selection object.  Works beautifully!</p>
<p>Kudos!<br />
Larry</p>
]]></content:encoded>
	</item>
</channel>
</rss>

