Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macroo assigned to CommandButton
I have a macro in Excel that works just fine when I run it from the toolbar.
However, when I create a CommandButton on the spreadsheet itself and copy the code from the macro, it will not run as hit encounters an error and goes into debugging. Can anyone shed any light on this as to why and what I have to do to fix it? Thanks so much... |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macroo assigned to CommandButton
ellflocko,
You may need to set the TakeFocusOnClick property of teh commandbutton to False to allow your code to work properly when assigned to a commandbutton. HTH, Bernie MS Excel MVP "ellflocko" <u22156@uwe wrote in message news:60af7618c3a7f@uwe... I have a macro in Excel that works just fine when I run it from the toolbar. However, when I create a CommandButton on the spreadsheet itself and copy the code from the macro, it will not run as hit encounters an error and goes into debugging. Can anyone shed any light on this as to why and what I have to do to fix it? Thanks so much... |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macroo assigned to CommandButton
I tried to do that but it did not work either. Any other thoughts? Thanks
for the reply. Bernie Deitrick wrote: ellflocko, You may need to set the TakeFocusOnClick property of teh commandbutton to False to allow your code to work properly when assigned to a commandbutton. HTH, Bernie MS Excel MVP I have a macro in Excel that works just fine when I run it from the toolbar. However, when I create a CommandButton on the spreadsheet itself and copy the code from the macro, it will not run as hit encounters an error and goes into debugging. Can anyone shed any light on this as to why and what I have to do to fix it? Thanks so much... -- Message posted via http://www.officekb.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Save assigned button | Excel Discussion (Misc queries) | |||
How do I know what macro is assigned to a button? | Excel Discussion (Misc queries) | |||
Variable with value before being assigned? | Excel Programming | |||
Buttons assigned to a macro | Excel Programming |