Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Disabling Built-in items on a menu

The following code disables the File menu on the Worksheet Menubar

CommandBars(1).Controls("File").Enabled = True

Ideally I'd like to be able to disable an individual item on the menu e.g.
"Print", but I've struggled to get there.

Can someone please explain how this is achieved?

Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Disabling Built-in items on a menu

Got it thanks:

With Application.CommandBars(1).Controls("File")
..Controls("Print...").Enabled = False
End With



"Project Mangler" wrote in message
...
The following code disables the File menu on the Worksheet Menubar

CommandBars(1).Controls("File").Enabled = True

Ideally I'd like to be able to disable an individual item on the menu e.g.
"Print", but I've struggled to get there.

Can someone please explain how this is achieved?

Thanks.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Disabling Built-in items on a menu

Better to use the ID
http://www.rondebruin.nl/menuid.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm



"Project Mangler" wrote in message ...
Got it thanks:

With Application.CommandBars(1).Controls("File")
.Controls("Print...").Enabled = False
End With



"Project Mangler" wrote in message
...
The following code disables the File menu on the Worksheet Menubar

CommandBars(1).Controls("File").Enabled = True

Ideally I'd like to be able to disable an individual item on the menu e.g.
"Print", but I've struggled to get there.

Can someone please explain how this is achieved?

Thanks.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Disabling Built-in items on a menu

Ron,

I should have thought of checking your site.

For some reason my code works fine at home (on Win2K/Excel 2003) but not in
my work environment (XP/Excel2003) if run in an activate or startup event.
Oddly it works in XP if I run the procedure directly using F5. Perhaps
switching to the ID will fix it.

Thanks for the reply!


"Ron de Bruin" wrote in message
...
Better to use the ID
http://www.rondebruin.nl/menuid.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm



"Project Mangler" wrote in message

...
Got it thanks:

With Application.CommandBars(1).Controls("File")
.Controls("Print...").Enabled = False
End With



"Project Mangler" wrote in message
...
The following code disables the File menu on the Worksheet Menubar

CommandBars(1).Controls("File").Enabled = True

Ideally I'd like to be able to disable an individual item on the menu

e.g.
"Print", but I've struggled to get there.

Can someone please explain how this is achieved?

Thanks.






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
disabling specific items under tools menu michael.beckinsale Excel Programming 0 February 24th 10 03:51 PM
Disabling scrollbars for an excel's built-in form (Autoform) Alfredo Excel Programming 0 July 5th 07 07:38 PM
Help with disabling items in the menu Les[_2_] Excel Programming 6 April 7th 07 07:24 AM
Help with Enabling / Disabling Menu Items..! Applewine[_2_] Excel Programming 1 June 13th 05 10:37 PM
Disabling menu items in VBE Michael Singmin Excel Programming 1 October 10th 03 01:39 PM


All times are GMT +1. The time now is 05:19 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"