WorkBook Open & Right Before Close Subs Not being called

G

Guest

This Sub is no longer working. Also the one I call when I load the file is
not working either.
Private Sub Workbook_BeforeClose(Cancel As Boolean)
'this builds the menus that are added when this workbook is loaded
Application.CommandBars("Worksheet Menu Bar").Controls("&Activity").Delete
End Sub

For loading:
Private Sub Workbook_Open()
MsgBox ("going to start adding menus")
I recently protected my macros from viewing: Tools VBA Protection. Would
this have any affect? Ideas?
 
G

Guest

When I removed the protection it worked! So what do I do as I wish to have
my cake and eat it too. I want the protection and I want the menus to be
added and removed.
 

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

Top