<?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: Using Copy/Paste in userforms</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2004/12/07/using-copypaste-in-userforms/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2004/12/07/using-copypaste-in-userforms/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Mon, 06 Feb 2012 18:39:56 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: leo</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/12/07/using-copypaste-in-userforms/#comment-58476</link>
		<dc:creator>leo</dc:creator>
		<pubDate>Fri, 04 Feb 2011 09:42:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=916#comment-58476</guid>
		<description>&lt;p&gt;I have followed original instructions with one class added as specified and it works so great thanks to Juan Pablo Gonzalez. However, when I right click I have only &quot;Copy&quot; and &quot;Paste&quot; options/buttons. How and where can I modify Juan&#039;s original code to include &quot;Cut&quot; and &quot;Delete&quot;? Thank you.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I have followed original instructions with one class added as specified and it works so great thanks to Juan Pablo Gonzalez. However, when I right click I have only &#8220;Copy&#8221; and &#8220;Paste&#8221; options/buttons. How and where can I modify Juan&#8217;s original code to include &#8220;Cut&#8221; and &#8220;Delete&#8221;? Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy Weckwerth</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/12/07/using-copypaste-in-userforms/#comment-42964</link>
		<dc:creator>Jeremy Weckwerth</dc:creator>
		<pubDate>Tue, 22 Dec 2009 22:28:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=916#comment-42964</guid>
		<description>&lt;p&gt;I recently found this forum.  I know its old and i dont even know if you guys are still actively reading this but im about to go insane.  Im working with excel 2003.  Im currently writing a program to simply one of our very common routines in my office.  Im using excel because i can build the program in the VBA editor and send it to everyone without having to go through the rigamorale (sp?) of corporate security to add a new program.  I have completed an intermedite level multipage userform.  and at first i was willing to dismiss right click....with such helpful words for my coworkers like &quot;if cant ctrl+c and ctrl+v you shouldnt have a job using computers in the first place&quot; however now that ive started messing around with and the helpful parts of this forum have given me some right click functionality, it has become my obsession.&lt;/p&gt;
&lt;p&gt;In short.  I really need the complete code to add Right click copy/paste commands to a multipage user form.  &lt;/p&gt;
&lt;p&gt;I tried using the main code then upon reading further the portion about not working with a multipage.  i attempted to add the exception but must be incompetent about where to put or the several hundred lines of code i already have is causing a problem.  although it shouldnt since VBA seems to mostly work isolated subroutines .....anyway&lt;/p&gt;
&lt;p&gt;if anyones out there and can help   &lt;a href=&quot;mailto:jeremyweck@gmail.com&quot;&gt;jeremyweck@gmail.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;HACK THE PLANET&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I recently found this forum.  I know its old and i dont even know if you guys are still actively reading this but im about to go insane.  Im working with excel 2003.  Im currently writing a program to simply one of our very common routines in my office.  Im using excel because i can build the program in the VBA editor and send it to everyone without having to go through the rigamorale (sp?) of corporate security to add a new program.  I have completed an intermedite level multipage userform.  and at first i was willing to dismiss right click&#8230;.with such helpful words for my coworkers like &#8220;if cant ctrl+c and ctrl+v you shouldnt have a job using computers in the first place&#8221; however now that ive started messing around with and the helpful parts of this forum have given me some right click functionality, it has become my obsession.</p>
<p>In short.  I really need the complete code to add Right click copy/paste commands to a multipage user form.  </p>
<p>I tried using the main code then upon reading further the portion about not working with a multipage.  i attempted to add the exception but must be incompetent about where to put or the several hundred lines of code i already have is causing a problem.  although it shouldnt since VBA seems to mostly work isolated subroutines &#8230;..anyway</p>
<p>if anyones out there and can help   <a href="mailto:jeremyweck@gmail.com">jeremyweck@gmail.com</a></p>
<p>HACK THE PLANET</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jinpol</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/12/07/using-copypaste-in-userforms/#comment-32955</link>
		<dc:creator>jinpol</dc:creator>
		<pubDate>Tue, 17 Jun 2008 13:03:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=916#comment-32955</guid>
		<description>&lt;p&gt;hi,&lt;/p&gt;
&lt;p&gt;will this work even if my textbox is in excel sheet? tnx&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>hi,</p>
<p>will this work even if my textbox is in excel sheet? tnx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/12/07/using-copypaste-in-userforms/#comment-32323</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Tue, 13 May 2008 23:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=916#comment-32323</guid>
		<description>&lt;p&gt;MSForms is a library that contains a Control class.  Other libraries also contain a Control class, so if you want a specific one, it&#039;s best to be explicit.  You can add MSForms manually (look for Microsoft Forms 2.0 Library under Tools References) or it is added for you if you have a userform in your project.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>MSForms is a library that contains a Control class.  Other libraries also contain a Control class, so if you want a specific one, it&#8217;s best to be explicit.  You can add MSForms manually (look for Microsoft Forms 2.0 Library under Tools References) or it is added for you if you have a userform in your project.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/12/07/using-copypaste-in-userforms/#comment-32174</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Mon, 05 May 2008 09:23:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=916#comment-32174</guid>
		<description>&lt;p&gt;Hi there,&lt;br&gt;
could you please tell me, what exactly MSForms.Control is, or why my Excel/VBA does not compile code with it (it says this type is not defined...)?&lt;br&gt;
Thx,&lt;br&gt;
Alex&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi there,<br />
could you please tell me, what exactly MSForms.Control is, or why my Excel/VBA does not compile code with it (it says this type is not defined&#8230;)?<br />
Thx,<br />
Alex</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/12/07/using-copypaste-in-userforms/#comment-30515</link>
		<dc:creator>Bill</dc:creator>
		<pubDate>Fri, 08 Feb 2008 19:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=916#comment-30515</guid>
		<description>&lt;p&gt;Hi Juan.&lt;/p&gt;
&lt;p&gt;I actually programmed it in Excel 2000. But I just tested it in Excel 2003, and I get the same error. I&#039;m now using your original code along with Stephen Bullen&#039;s edits shown in his initial post. In his ActiveControl function, it gets to the line &quot;Set ActiveControl = fmUserform.ActiveControl&quot;, then chokes on &quot;If TypeOf ActiveControl Is MSForms.TextBox&quot;. Hovering over ActiveControl at that point gives me &quot;ActiveContol = Nothing&quot;, so apparently that Set command isn&#039;t picking up anything from fmUserform.ActiveControl.&lt;/p&gt;
&lt;p&gt;A slight modification to exactly what happens: I open another spreadsheet and highlight some cells in it, hit Edit/Copy, and I get the error message I mentioned earlier. It&#039;s pretty harmless actually because I can simply cancel out of the error message, the cells are still highlighted and are on the clipboard. Still an annoyance though.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Juan.</p>
<p>I actually programmed it in Excel 2000. But I just tested it in Excel 2003, and I get the same error. I&#8217;m now using your original code along with Stephen Bullen&#8217;s edits shown in his initial post. In his ActiveControl function, it gets to the line &#8220;Set ActiveControl = fmUserform.ActiveControl&#8221;, then chokes on &#8220;If TypeOf ActiveControl Is MSForms.TextBox&#8221;. Hovering over ActiveControl at that point gives me &#8220;ActiveContol = Nothing&#8221;, so apparently that Set command isn&#8217;t picking up anything from fmUserform.ActiveControl.</p>
<p>A slight modification to exactly what happens: I open another spreadsheet and highlight some cells in it, hit Edit/Copy, and I get the error message I mentioned earlier. It&#8217;s pretty harmless actually because I can simply cancel out of the error message, the cells are still highlighted and are on the clipboard. Still an annoyance though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juan Pablo Gonzalez</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/12/07/using-copypaste-in-userforms/#comment-30513</link>
		<dc:creator>Juan Pablo Gonzalez</dc:creator>
		<pubDate>Fri, 08 Feb 2008 17:52:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=916#comment-30513</guid>
		<description>&lt;p&gt;Hi Bill,&lt;/p&gt;
&lt;p&gt;I cannot replicate your problem either on Excel 2003 or Excel 2007.  What version are you using?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Bill,</p>
<p>I cannot replicate your problem either on Excel 2003 or Excel 2007.  What version are you using?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/12/07/using-copypaste-in-userforms/#comment-30496</link>
		<dc:creator>Bill</dc:creator>
		<pubDate>Thu, 07 Feb 2008 18:59:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=916#comment-30496</guid>
		<description>&lt;p&gt;Complete noobie question here...&lt;/p&gt;
&lt;p&gt;I just found this blog, so bear with me. I have copied the code in the original post above, works great EXCEPT:&lt;/p&gt;
&lt;p&gt;I have the exact code as above in an open spreadsheet. If I then open another Excel spreadsheet, highlight some cells, and then hit Edit/Copy, I immediately get an error popup &quot;Object variable or With block variable not set&quot; -- it is choking on the cmdCopyButton_Click subroutine. Only happens the first time I try to use the Copy command; if I cancel the operation, then try the Copy command again, no error message.&lt;/p&gt;
&lt;p&gt;Is there a fix to prevent this?&lt;/p&gt;
&lt;p&gt;TIA.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Complete noobie question here&#8230;</p>
<p>I just found this blog, so bear with me. I have copied the code in the original post above, works great EXCEPT:</p>
<p>I have the exact code as above in an open spreadsheet. If I then open another Excel spreadsheet, highlight some cells, and then hit Edit/Copy, I immediately get an error popup &#8220;Object variable or With block variable not set&#8221; &#8212; it is choking on the cmdCopyButton_Click subroutine. Only happens the first time I try to use the Copy command; if I cancel the operation, then try the Copy command again, no error message.</p>
<p>Is there a fix to prevent this?</p>
<p>TIA.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vasile</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/12/07/using-copypaste-in-userforms/#comment-8452</link>
		<dc:creator>Vasile</dc:creator>
		<pubDate>Mon, 14 Feb 2005 18:53:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=916#comment-8452</guid>
		<description>&lt;p&gt;Sorry for bothering you with such a stoopid question.&lt;br&gt;
I found the answer:&lt;/p&gt;
&lt;p&gt;Me.MultiPage1.Pages(Me.MultiPage1.Value).ActiveControl.Name &lt;/p&gt;
&lt;p&gt;Long live google!&lt;br&gt;
(and wish me success learning to write code ;))&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Sorry for bothering you with such a stoopid question.<br />
I found the answer:</p>
<p>Me.MultiPage1.Pages(Me.MultiPage1.Value).ActiveControl.Name </p>
<p>Long live google!<br />
(and wish me success learning to write code <img src='http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vasile</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/12/07/using-copypaste-in-userforms/#comment-8451</link>
		<dc:creator>Vasile</dc:creator>
		<pubDate>Mon, 14 Feb 2005 18:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=916#comment-8451</guid>
		<description>&lt;p&gt;I tried this function on a mutipage and it doesn&#039;t work, because multipages do not support &quot;activecontrol&quot; property(Excel2003).&lt;br&gt;
Anyone knows a workaround?&lt;/p&gt;
&lt;p&gt;Function ActiveControl(Optional ctlContainer As MSForms.Control) As MSForms.Control&lt;/p&gt;
&lt;p&gt;If ctlContainer Is Nothing Then&lt;br&gt;
ëGet the active control on the form&lt;br&gt;
Set ActiveControl = fmUserform.ActiveControl&lt;br&gt;
Else&lt;br&gt;
ëGet the active control inside the container&lt;br&gt;
Set ActiveControl = ctlContainer.ActiveControl&lt;br&gt;
End If&lt;/p&gt;
&lt;p&gt;ëHave we got a text box yet?&lt;br&gt;
If TypeOf ActiveControl Is MSForms.TextBox Then&lt;br&gt;
Exit Function&lt;br&gt;
Else&lt;br&gt;
ëNo, so recurse through the container controls&lt;br&gt;
Set ActiveControl = ActiveControl(ActiveControl)&lt;br&gt;
End If&lt;/p&gt;
&lt;p&gt;End Function&lt;/p&gt;
&lt;p&gt;by Stephen Bullen &lt;/p&gt;
&lt;p&gt;Many thanks!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I tried this function on a mutipage and it doesn&#8217;t work, because multipages do not support &#8220;activecontrol&#8221; property(Excel2003).<br />
Anyone knows a workaround?</p>
<p>Function ActiveControl(Optional ctlContainer As MSForms.Control) As MSForms.Control</p>
<p>If ctlContainer Is Nothing Then<br />
ëGet the active control on the form<br />
Set ActiveControl = fmUserform.ActiveControl<br />
Else<br />
ëGet the active control inside the container<br />
Set ActiveControl = ctlContainer.ActiveControl<br />
End If</p>
<p>ëHave we got a text box yet?<br />
If TypeOf ActiveControl Is MSForms.TextBox Then<br />
Exit Function<br />
Else<br />
ëNo, so recurse through the container controls<br />
Set ActiveControl = ActiveControl(ActiveControl)<br />
End If</p>
<p>End Function</p>
<p>by Stephen Bullen </p>
<p>Many thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

