Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Custom Toolbar Macros

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Custom Toolbar Macros

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.

--
Regards,
Tom Ogilvy


Merlzie wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom toolbar for template - macros not working Ann Scharpf Excel Discussion (Misc queries) 2 February 5th 07 10:54 PM
Have problem sending spreadsheet email and losing custom toolbar and macros memphoman Excel Discussion (Misc queries) 0 January 19th 06 08:40 PM
toolbar macros Ned Kelly Excel Discussion (Misc queries) 0 December 22nd 05 03:52 PM
Custom toolbar and macros MD Excel Discussion (Misc queries) 2 May 10th 05 05:31 PM
saving toolbar buttons on custom toolbar Paul James Excel Programming 12 August 6th 03 08:28 AM


All times are GMT +1. The time now is 12:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"