View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
ellflocko via OfficeKB.com ellflocko via OfficeKB.com is offline
external usenet poster
 
Posts: 3
Default 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