Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Disable control

When you click on the Excel icon which appears on the top left hand corner of
a workbook, several commands become available. Can I disable the command
say 'New Window' using vba? Any help is very much appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Disable control

Hi Francis

Start here
http://www.rondebruin.nl/menuid.htm

To disable the whole bar use
Application.CommandBars("Document").Enabled = False


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Francis Ang" wrote in message ...
When you click on the Excel icon which appears on the top left hand corner of
a workbook, several commands become available. Can I disable the command
say 'New Window' using vba? Any help is very much appreciated.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Disable control

bEnabled = False
' only disable 'New Window'
Application.CommandBars.FindControl(ID:=303).Enabl ed = bEnabled

' or desable the menu
Application.CommandBars("Document").Enabled = bEnabled
' don't forget to reset these to True

Regards,
Peter T

"Francis Ang" wrote in message
...
When you click on the Excel icon which appears on the top left hand corner

of
a workbook, several commands become available. Can I disable the command
say 'New Window' using vba? Any help is very much appreciated.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Disable control

Hi Ron, Peter,

Thank you very much for the replies. Really appreciate your advice.

"Peter T" wrote:

bEnabled = False
' only disable 'New Window'
Application.CommandBars.FindControl(ID:=303).Enabl ed = bEnabled

' or desable the menu
Application.CommandBars("Document").Enabled = bEnabled
' don't forget to reset these to True

Regards,
Peter T

"Francis Ang" wrote in message
...
When you click on the Excel icon which appears on the top left hand corner

of
a workbook, several commands become available. Can I disable the command
say 'New Window' using vba? Any help is very much appreciated.




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
disable control vj5 Excel Programming 0 July 6th 06 07:46 AM
disable control vj5 Excel Programming 0 July 6th 06 07:45 AM
Disable Excel Control sebastienm Excel Programming 1 August 11th 04 08:01 PM
Disable Excel Control Jim Rech Excel Programming 0 August 11th 04 07:23 PM
Disable Control s Dave[_18_] Excel Programming 0 July 17th 03 05:59 PM


All times are GMT +1. The time now is 05:45 AM.

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"