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

Opened an Excel 97 file with Excel 2000. Old file had an auto_open procedure which apparently hides the main worksheet commandbar. Now can't reopen this old file to read the code. It somehow became corrupted. Cannot get this commandbar to become visible with code 'Application.Commandbars(1).Visible = True'. Reinstalled Excel 2000 and commandbar still will not respond. Looped through entire commandbar collection and this bar appears at the top of the list. Anybody got any ideas
Thanks, Gene Walker
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Worksheet Menu Bar

Gene

Try this in the Immediate Window

Application.CommandBars("Worksheet Menu Bar").Enabled = True

Gord Dibben Excel MVP

On Mon, 12 Apr 2004 22:36:02 -0700, "Gene" wrote:

Opened an Excel 97 file with Excel 2000. Old file had an auto_open procedure which apparently hides the main worksheet commandbar. Now can't reopen this old file to read the code. It somehow became corrupted. Cannot get this commandbar to become visible with code 'Application.Commandbars(1).Visible = True'. Reinstalled Excel 2000 and commandbar still will not respond. Looped through entire commandbar collection and this bar appears at the top of the list. Anybody got any ideas?
Thanks, Gene Walker


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Worksheet Menu Bar

I've always used CommandBars.ActiveMenuBar

Which is better?


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Gene

Try this in the Immediate Window

Application.CommandBars("Worksheet Menu Bar").Enabled = True

Gord Dibben Excel MVP

On Mon, 12 Apr 2004 22:36:02 -0700, "Gene" wrote:

Opened an Excel 97 file with Excel 2000. Old file had an auto_open

procedure which apparently hides the main worksheet commandbar. Now can't
reopen this old file to read the code. It somehow became corrupted. Cannot
get this commandbar to become visible with code
'Application.Commandbars(1).Visible = True'. Reinstalled Excel 2000 and
commandbar still will not respond. Looped through entire commandbar
collection and this bar appears at the top of the list. Anybody got any
ideas?
Thanks, Gene Walker




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Worksheet Menu Bar

Hi Rob:

I would think the explicit solution is less ambiguous. For example, I
believe the ActiveMenuBar property returns the chart menu bar when a chart
is active.

Regards,

Vasant.


"Rob van Gelder" wrote in message
...
I've always used CommandBars.ActiveMenuBar

Which is better?


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Gene

Try this in the Immediate Window

Application.CommandBars("Worksheet Menu Bar").Enabled = True

Gord Dibben Excel MVP

On Mon, 12 Apr 2004 22:36:02 -0700, "Gene" wrote:

Opened an Excel 97 file with Excel 2000. Old file had an auto_open

procedure which apparently hides the main worksheet commandbar. Now can't
reopen this old file to read the code. It somehow became corrupted.

Cannot
get this commandbar to become visible with code
'Application.Commandbars(1).Visible = True'. Reinstalled Excel 2000 and
commandbar still will not respond. Looped through entire commandbar
collection and this bar appears at the top of the list. Anybody got any
ideas?
Thanks, Gene Walker






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Worksheet Menu Bar

You're correct about the menu when a Chart is active.

That in itself is reason enough for me to change.


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message
...
Hi Rob:

I would think the explicit solution is less ambiguous. For example, I
believe the ActiveMenuBar property returns the chart menu bar when a chart
is active.

Regards,

Vasant.


"Rob van Gelder" wrote in message
...
I've always used CommandBars.ActiveMenuBar

Which is better?


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Gene

Try this in the Immediate Window

Application.CommandBars("Worksheet Menu Bar").Enabled = True

Gord Dibben Excel MVP

On Mon, 12 Apr 2004 22:36:02 -0700, "Gene" wrote:

Opened an Excel 97 file with Excel 2000. Old file had an auto_open

procedure which apparently hides the main worksheet commandbar. Now

can't
reopen this old file to read the code. It somehow became corrupted.

Cannot
get this commandbar to become visible with code
'Application.Commandbars(1).Visible = True'. Reinstalled Excel 2000 and
commandbar still will not respond. Looped through entire commandbar
collection and this bar appears at the top of the list. Anybody got any
ideas?
Thanks, Gene Walker









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Worksheet Menu Bar

Gene,

I think you have your answer in that it is the enabled property that you
want, not the visible property. FYI When you loop through the collection,
you can always test the name print out the index

For Each cb In Application.CommandBars
If cb.Name = "Worksheet Menu Bar" Then
Debug.Print cb.Index
Exit For
End If
Next cb

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Gene" wrote in message
...
Opened an Excel 97 file with Excel 2000. Old file had an auto_open

procedure which apparently hides the main worksheet commandbar. Now can't
reopen this old file to read the code. It somehow became corrupted. Cannot
get this commandbar to become visible with code
'Application.Commandbars(1).Visible = True'. Reinstalled Excel 2000 and
commandbar still will not respond. Looped through entire commandbar
collection and this bar appears at the top of the list. Anybody got any
ideas?
Thanks, Gene Walker



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
Worksheet menu bar Mark Excel Discussion (Misc queries) 3 June 29th 07 02:20 AM
Can I create a worksheet menu to select each other worksheet pippagrace Excel Discussion (Misc queries) 4 June 23rd 06 01:28 PM
My Worksheet Menu Bar is Gone? JPM Excel Discussion (Misc queries) 1 June 20th 06 04:19 AM
Worksheet menu bar Lionel M Fridjhon Excel Discussion (Misc queries) 2 June 9th 06 11:54 PM
worksheet menu bar ditchy Excel Discussion (Misc queries) 4 May 4th 05 10:09 AM


All times are GMT +1. The time now is 10:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"