I used the following vb code in a file to disable a the menu items. Now
every time I open Excel the Menu is not there.
Green around the gills with vb. What did I do wrong?
Application.CommandBars.("Worksheet Menu Bar").Enabled = False
I used the following vb code in a file to disable a the menu items. Now
every time I open Excel the Menu is not there.
Green around the gills with vb. What did I do wrong?
Application.CommandBars.("Worksheet Menu Bar").Enabled = False
Hi JenniferMc
Open Excel
Alt-F11
Insert module
Paste the sub
Alt-Q
Alt-F8
Select test
Run
Sub test()
Application.CommandBars("Worksheet Menu Bar").Enabled = True
End Sub
--
Regards Ron de Bruin
http://www.rondebruin.nl
"JenniferMc" <[email protected]> wrote in message news:[email protected]...
>I used the following vb code in a file to disable a the menu items. Now
> every time I open Excel the Menu is not there.
> Green around the gills with vb. What did I do wrong?
>
> Application.CommandBars.("Worksheet Menu Bar").Enabled = False
"JenniferMc" wrote:
> I used the following vb code in a file to disable a the menu items. Now
> every time I open Excel the Menu is not there.
> Green around the gills with vb. What did I do wrong?
>
> Application.CommandBars.("Worksheet Menu Bar").Enabled = False
I learned the hard way that those code lines become the ongoing defaults for
Excel. I cured it by running a macro wherein the codes end in "=True". The
problem is that any users that you gave your macros to now have the same
problem of a missing menu. You'll have to send them the repair macro.
Regards
Paul
Can this code run when the document is closed so that only the specific
workbook is impacted?
"Ron de Bruin" wrote:
> Hi JenniferMc
>
> Open Excel
> Alt-F11
> Insert module
> Paste the sub
> Alt-Q
>
> Alt-F8
> Select test
> Run
>
> Sub test()
> Application.CommandBars("Worksheet Menu Bar").Enabled = True
> End Sub
>
>
>
> --
> Regards Ron de Bruin
> http://www.rondebruin.nl
>
>
>
> "JenniferMc" <[email protected]> wrote in message news:[email protected]...
> >I used the following vb code in a file to disable a the menu items. Now
> > every time I open Excel the Menu is not there.
> > Green around the gills with vb. What did I do wrong?
> >
> > Application.CommandBars.("Worksheet Menu Bar").Enabled = False
>
>
>
Sure
Use this events in the thisworkbook module
Private Sub Workbook_Activate()
Application.CommandBars("Worksheet Menu Bar").Enabled = False
End Sub
Private Sub Workbook_Deactivate()
Application.CommandBars("Worksheet Menu Bar").Enabled = True
End Sub
--
Regards Ron de Bruin
http://www.rondebruin.nl
"JenniferMc" <[email protected]> wrote in message news:[email protected]...
> Can this code run when the document is closed so that only the specific
> workbook is impacted?
>
> "Ron de Bruin" wrote:
>
>> Hi JenniferMc
>>
>> Open Excel
>> Alt-F11
>> Insert module
>> Paste the sub
>> Alt-Q
>>
>> Alt-F8
>> Select test
>> Run
>>
>> Sub test()
>> Application.CommandBars("Worksheet Menu Bar").Enabled = True
>> End Sub
>>
>>
>>
>> --
>> Regards Ron de Bruin
>> http://www.rondebruin.nl
>>
>>
>>
>> "JenniferMc" <[email protected]> wrote in message news:[email protected]...
>> >I used the following vb code in a file to disable a the menu items. Now
>> > every time I open Excel the Menu is not there.
>> > Green around the gills with vb. What did I do wrong?
>> >
>> > Application.CommandBars.("Worksheet Menu Bar").Enabled = False
>>
>>
>>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks