View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default 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...