Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 471
Default WorkBook Open & Right Before Close Subs Not being called

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 471
Default WorkBook Open & Right Before Close Subs Not being called

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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Workbook_Open event not called when workbook forced to re-open in read-only mode. Chrisso Excel Programming 2 May 15th 07 03:44 PM
Open workbook on close Mike[_114_] Excel Programming 0 January 8th 07 10:24 PM
When I open a workbook, another one called Book1 is also opened. W Ian@MarlandLtd Excel Discussion (Misc queries) 2 November 9th 05 09:36 AM
Called subs versus functions Neal Zimm Excel Programming 2 April 5th 05 06:43 AM
how to make subs/procs can only be called from within the workbook they belong to? Arnoud Oortwijk Excel Programming 2 September 27th 03 03:43 AM


All times are GMT +1. The time now is 10:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"