View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
hbj hbj is offline
external usenet poster
 
Posts: 35
Default On-sheet activeX component disables copy/paste

On Wednesday, 2 July 2014 19:38:03 UTC+3, GS wrote:
Thank you Claus,




Your code is of cource shorter, but it does not solve the main problem. When the code runs it grayes out the Clipboard tool. Only Paste as image is available.




H�kan




By default, executing VBA clears the Clipboard of its current contents.



--

-

Garry


Well Garry,

It seems that this is not quite the truth. You can have lot of code in the Worksheet_SelectionChange() procedure, still the Clipboard is not cleared = you can use copy/paste.

In fact, programatically affecting the properties of the embedded ActiveX control clears the clipboard. This fact is partly discussed in the link below:
http://msdn.microsoft.com/en-us/libr...ffice.11).aspx

I think I'd better explicitely activate the ActiveX control, when needed.

Håkan