diff toolbar for diff workbook

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

Guest

Hello,

I am just wondering if i open up A workbook, it will appear A toolbar . if i
open another workbook, it will appear that toolbar for that workbook. Simply
said, just want to make the macro tool buttons independent for each workbook.
It seems the the create toolbar thing is linked to the whole excel program,
see all my toolbars that i have created so far even when i just open up the
exel application without opening any workbook.

Can anyone give some advice on how to make it independent? btw, i did not
know how to write the script for creating toolbar and buttons, i just did it
using the excel "add and remove" button under view toolbar menu.
 
You should create your toolbar in the on activate event and delete it i
the
deactivate event
 
Hi Kaak,

Thanks for your reply.

wHat do u mean by on activate and deactivitive? i have never come across
this before? can u elaborate further?
 
The workbook has events of his one.

This code is for the workbook, not in a module or in a sheet.

Private Sub Workbook_Activate()

'MsgBox ("Workbook_Activate")

Call CreateMenu

End Sub

Private Sub Workbook_Deactivate()

'MsgBox ("Workbook_Deactivate")

Call DeleteMenu

End Sub
 

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

Back
Top