![]() |
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 |
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 |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 10:45 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com