LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 202
Default Reset VB Code Not Working on Close

New to VB. Want to remove the Insert Worksheet option on open and Reset at
close. Using this code:

Module 1:
Sub menuItem_Delete()
Dim myCmd As Object
Set myCmd = CommandBars("Worksheet menu bar").Controls("Insert")
myCmd.Controls("Worksheet").Delete
End Sub

Module 2:
Sub MenuBar_Restore()
CommandBars("Insert").Reset
End Sub

Can't get Module 2 to work on close. Any help is greatly appreciated.
 
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
Reset button code for Radio Buttons [email protected] Excel Discussion (Misc queries) 6 August 25th 12 03:09 PM
Delete Insert Worksheet on Open/Reset on Close Jane Excel Programming 1 April 10th 06 02:08 PM
Master reset code bug - stumped again peter.thompson[_28_] Excel Programming 1 January 7th 06 07:38 AM
Master reset code -stumped peter.thompson[_24_] Excel Programming 6 January 7th 06 01:35 AM
How do I reset the LastUsed cell reference from code. Henry[_4_] Excel Programming 2 October 12th 03 09:34 PM


All times are GMT +1. The time now is 06:53 AM.

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

About Us

"It's about Microsoft Excel"