View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Macros assigned to buttons do not work when copied to CD

Put code in the workbook (workbook_open event) that assignes the appropriate
macro to the onaction property of the workbook. If you don't include any
path, it should then add the current path for your workbook or you can use
the Thisworkbook.path to assign it.

--
Regards,
Tom Ogilvy

"Bill Cockerill" wrote in message
om...
Dear Group,

I have built a workbook with a custom toolbar.

The buttons on the toolbar are assigned to macros in the workbook.

However, when I copy the workbook to a CD and run it from there, it
tries to run the macros from the original workbook, not the CD copy.

It then tells me I can't have two workbooks of the same name open!

How can I assign macros to buttons that work from that workbook, no
matter where it is copied to?

Thanks, Bill