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: 3
Default re-enabling macro under menu item

A few posts here provide me added knowledge. In one, it mentioned a way to disable "Print option under File", using

CommandBars("Worksheet Menu Bar").Controls("File").Controls("Print...").Enable d = Fals

Suppose I open a new Excel file. Fire up macro editor and make up one macro with the following variant
sub disableM(
CommandBars("Worksheet Menu Bar").Controls("File").Controls("Print...").Enable d = Fals
end su

I save the Excel file as test.xls. Run the macro. It "works". The macro option has gone. But then how can I get my macro option back? I thought my 'macro option' will be back if I close Excel and reopen Excel. But no, the option doesn't come back. What is the simplest solution (to give the macro function back to the user) IF this was the case

I am a little bit smarter than the dummies. I do not actually have such a problem because I "forsee" it. I did wrote an enableM() function together with my disableM() function under "test.xls". So what I did to resolve the problem is to enter the keyboard shortcut for enableM(). But IN CASE there wasn't such command, is there a simpler solution to reset the macro function back to life, without borrowing another pc to create an excel file with enableM() macro


 
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
Enabling sub menu items via vba Dan Neely Excel Worksheet Functions 0 July 11th 05 04:48 PM
Enabling shortcut menu Slypaw Excel Discussion (Misc queries) 3 March 16th 05 12:37 AM
Menu items added with menu item editor in older versions Michael Hoffmann Excel Discussion (Misc queries) 2 January 7th 05 01:40 PM
Disable File-Save menu item in macro? BrianG[_4_] Excel Programming 1 February 25th 04 06:48 PM
Macro to display a menu item - possible? TonyJeffs Excel Programming 3 November 16th 03 08:38 AM


All times are GMT +1. The time now is 12:39 PM.

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"