![]() |
assign macro to active workbook??
I have 6 instances of a spreadhseet for different sites. they all have the
same toolbars created and every time you open one it imports the toolbars and every time you close one it deletes the toolbars. This works good if you only have one sheet open at a time, but if you have 2 open at the same time the first one open has the toolbar that refers to that workbook. if you close thefirst sheet the toolbar stays and the buttons refer to the now closed wrkbook and if you click one of the buttons it reopends that work book. Is there a way to have the macros assigned to the buttons as activeworkbook, instead of the workbook name? |
assign macro to active workbook??
How about an alternative suggestion.
Remove all the code from each of these workbooks. Create a new workbook with all this code and save it as an addin. Tell the users to open this addin each time they need to use one of those macros. By having only one workbook/addin with the code, it should be easier to update when things change, too. Kevin wrote: I have 6 instances of a spreadhseet for different sites. they all have the same toolbars created and every time you open one it imports the toolbars and every time you close one it deletes the toolbars. This works good if you only have one sheet open at a time, but if you have 2 open at the same time the first one open has the toolbar that refers to that workbook. if you close thefirst sheet the toolbar stays and the buttons refer to the now closed wrkbook and if you click one of the buttons it reopends that work book. Is there a way to have the macros assigned to the buttons as activeworkbook, instead of the workbook name? -- Dave Peterson |
All times are GMT +1. The time now is 06:14 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com