From: Project Mangler on
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.


From: Project Mangler on
Got it thanks:

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



"Project Mangler" <dblack(a)ntlworld.com> wrote in message
news:%23buHBDG%23KHA.420(a)TK2MSFTNGP02.phx.gbl...
> 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.
>
>


From: Ron de Bruin on
Better to use the ID
http://www.rondebruin.nl/menuid.htm

--

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



"Project Mangler" <dblack(a)ntlworld.com> wrote in message news:uxbTmQG#KHA.3580(a)TK2MSFTNGP06.phx.gbl...
> Got it thanks:
>
> With Application.CommandBars(1).Controls("File")
> .Controls("Print...").Enabled = False
> End With
>
>
>
> "Project Mangler" <dblack(a)ntlworld.com> wrote in message
> news:%23buHBDG%23KHA.420(a)TK2MSFTNGP02.phx.gbl...
>> 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.
>>
>>
>
>
From: Project Mangler on
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" <rondebruin(a)kabelfoon.nl> wrote in message
news:OB%23GuKS%23KHA.348(a)TK2MSFTNGP06.phx.gbl...
> Better to use the ID
> http://www.rondebruin.nl/menuid.htm
>
> --
>
> Regards Ron de Bruin
> http://www.rondebruin.nl/tips.htm
>
>
>
> "Project Mangler" <dblack(a)ntlworld.com> wrote in message
news:uxbTmQG#KHA.3580(a)TK2MSFTNGP06.phx.gbl...
> > Got it thanks:
> >
> > With Application.CommandBars(1).Controls("File")
> > .Controls("Print...").Enabled = False
> > End With
> >
> >
> >
> > "Project Mangler" <dblack(a)ntlworld.com> wrote in message
> > news:%23buHBDG%23KHA.420(a)TK2MSFTNGP02.phx.gbl...
> >> 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.
> >>
> >>
> >
> >


 | 
Pages: 1
Prev: visual basic excel 2000
Next: String Search