PC Review


Reply
Thread Tools Rate Thread

Disable control

 
 
=?Utf-8?B?RnJhbmNpcyBBbmc=?=
Guest
Posts: n/a
 
      7th Oct 2006
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 With Quote
 
 
 
 
Ron de Bruin
Guest
Posts: n/a
 
      7th Oct 2006
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" <(E-Mail Removed)> wrote in message news:3B2C7CC6-63F0-46DF-BD80-(E-Mail Removed)...
> 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 With Quote
 
Peter T
Guest
Posts: n/a
 
      7th Oct 2006
bEnabled = False
' only disable 'New Window'
Application.CommandBars.FindControl(ID:=303).Enabled = bEnabled

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

Regards,
Peter T

"Francis Ang" <(E-Mail Removed)> wrote in message
news:3B2C7CC6-63F0-46DF-BD80-(E-Mail Removed)...
> 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 With Quote
 
=?Utf-8?B?RnJhbmNpcyBBbmc=?=
Guest
Posts: n/a
 
      10th Oct 2006
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).Enabled = bEnabled
>
> ' or desable the menu
> Application.CommandBars("Document").Enabled = bEnabled
> ' don't forget to reset these to True
>
> Regards,
> Peter T
>
> "Francis Ang" <(E-Mail Removed)> wrote in message
> news:3B2C7CC6-63F0-46DF-BD80-(E-Mail Removed)...
> > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using a Forms control to disable an ActiveX control exceluser Microsoft Excel Discussion 0 18th Oct 2010 02:56 AM
Disable or lock a control based on the value of another control =?Utf-8?B?TWFyayBCYWtlcg==?= Microsoft Access Forms 3 13th Mar 2007 02:21 AM
Disable control on exit - Can't disable control that has focus... =?Utf-8?B?SkJIYW5zZW4=?= Microsoft Access Form Coding 2 19th Feb 2007 07:19 PM
how to disable checkbox 'Enable remote control' in the remote control tab in a user property panel lolo Microsoft Dot NET Framework 0 31st Aug 2006 09:40 AM
Disable a control Ivor Williams Microsoft Access Forms 0 15th Sep 2003 12:22 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:07 PM.