assign macro to active workbook??

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

assigning macro 2
Open and close custom toolbar with workbook 1
Assign macro 2
assign macro - toolbar 2
2003 toolbars problem 1
toolbars - button 2
Problem with workbook on_open event 1
Toolbar macro re-named 4

Back
Top