![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Thanks for the help...
Several of the controls on a custom command bar have macros assigned to them... When I re-open this template after having saved a copy as a workbook, the commandbar's control's, which have assigned macros, now refer to the saved workbook and not the template. I'm losing hair on this one. Thanks for the replies... Tom |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
Tom, I always try to create commandbars on the fly, that is, create them on the Workbook_Open and delete them on Workbook_BeforeClose.
I saw a while ago a suggestion that I think can work for you, in the Workbook_Open they made sure that each button pointed to the Active Workbook, not the original Workbook. I imagine that this is done by setting the OnAction property of each button. Hope that helps |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
I'll try it out
Thanks Juan. Tom |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Juan, you are a genius!
Works perfectly! This is actually for Chookers. I will let him/her know. Thanks! Tom |
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
Great ! I would still prefer to create that commandbar on the fly !
|
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Mar 2002
Posts: 115
|
Mr T thank you so much for that, yes I will thank Juan for sure. Will try it out as soon as I get out of class. I did actually read Ivan's reply before BUT I just didn't know enough to understand it! I am slowly getting there, sorry Ivan.
Now for a really stupid question. For me to create the custom bars on the fly, what exactly does that mean? If anyone can clarify I will certainly do that, and in any case I'd love to know. Mr. T thanks so much, and Ivan and Juan!!! Cheers! |
|
|
|
|
|
#7 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Chookers, I have never created a custom bar with code, but I have seen plenty of reference to it in VBA help and at Microsofts MSDN site. Start there and then post if you need help with the finer points.
Tom |
|
|
|
|
|
#8 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
understand then just ask, someone will always try and reply/help no matter what the Q. Creating a commandbar on the fly just means CREATING your custom commandbar when your workbook opens. When your workbook is closed it gets DELETED, not hidden. If it is just hidden/not visible then you can potentially still have a reference to this book that could be called up again. There are plenty of examples on the Net, and I have used this a bit. Have a look here for the MenuMk http://www.j-walk.com/ss/excel Examples: Have a look @ this; |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|