Custom Toolbar Macros

  • Thread starter Thread starter Merlzie
  • Start date Start date
M

Merlzie

Maybe someone can lend a hand...

I looking for a method of setting a macro to a custom
toolbar button via VBA. My problem is that the custom
toolbar isn't workbook specific and everytime a new file
is opened, the toolbar button looks to execute the macro
from the last file.

Thanks
 
object.OnAction = "MyWorkbook.xls!MyMacro"

where object would be a reference to your toolbar button and MyWorkbook.xls
is open. If it will be closed, put in the path as well.
 
Back
Top