Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
On-sheet activeX component disables copy/paste
Hi xlgurus,
I have inserted an ActiveX pushbutton to a worksheet, the position of which follows the selected cell. The corresponding VBA code is triggered by event Worksheet_SelectionChange. The purpose is to make it easier to toggle value in a specific column of selected row. By occasion, when I tested it I found that normal Copy/Paste is disabled. This happens at the very line where I set the position of the control: ActiveSheet.OLEObjects("cmdSetReset").Top = rngAct.Top Any ideas... Hakan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
On-sheet activeX component disables copy/paste
Hi Hakan,
Am Wed, 2 Jul 2014 07:36:46 -0700 (PDT) schrieb hbj: ActiveSheet.OLEObjects("cmdSetReset").Top = rngAct.Top try: Private Sub Worksheet_SelectionChange(ByVal Target As Range) cmdSetReset.Top = Target.Top End Sub Regards Claus B. -- Vista Ultimate / Windows7 Office 2007 Ultimate / 2010 Professional |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
On-sheet activeX component disables copy/paste
On Wednesday, 2 July 2014 17:43:54 UTC+3, Claus Busch wrote:
Hi Hakan, Am Wed, 2 Jul 2014 07:36:46 -0700 (PDT) schrieb hbj: ActiveSheet.OLEObjects("cmdSetReset").Top = rngAct.Top try: Private Sub Worksheet_SelectionChange(ByVal Target As Range) cmdSetReset.Top = Target.Top End Sub Regards Claus B. -- Vista Ultimate / Windows7 Office 2007 Ultimate / 2010 Professional 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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
On-sheet activeX component disables copy/paste
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 Free Usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
On-sheet activeX component disables copy/paste
On 07/02/2014 2:12 PM, hbj wrote:
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 Sorry but the article you link to does not support your reply! -- - Garry Free Usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
On-sheet activeX component disables copy/paste
On 07/02/2014 2:12 PM, hbj wrote:
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 Sorry.., my bad! I stand corrected as I should have explicitly stated *some" VBA, not all as my statement suggests. I was thinking in the context of your scenario!<g -- - Garry Free Usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ActiveX ProgressBar - Scrolling Error disables color update | Excel Programming | |||
Activex component can't create object | New Users to Excel | |||
Use Office spreadsheet component in a ActiveX dll | Excel Programming | |||
Spreadsheet component in an ActiveX dll | Excel Programming | |||
ActiveX component can't be created | Excel Programming |