Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Missing toolbars in Excel

Status
Not open for further replies.

david7777777777

Programmer
Joined
Sep 26, 2001
Messages
417
Location
US
This is for Excel 97 on Windows 98 SE. After a user opened a particular Excel file that contains macros and such, she now has no toolbars in Excel with any Excel document. These toolbars are neither listed on the [Toolbars] tab in the [Customize] area where you can typically modify the toolbars.

I have a feeling this is the result of someone knowing just enough VBA to be stupid with it. Anyone seen this happen before?
 
Your summation is correct.

Open Excel, hit Alt+F11
Insert-Module.
Paste this in it:

Sub ResetAllToolbars()
For Each tb In CommandBars
If tb.Type = msoBarTypeNormal Then
If tb.BuiltIn Then tb.Reset
End If
Next tb
End Sub

Hit the little blue right-pointing arrow on the VBE toolbar. Make sure the toolbars are back. Exit Excel and don't save the file....

Code stolen from :D

Anne Troy
Word and Excel Macros
Coming soon: wX
 
I am using Excel 2000 on Windows 2000 Pro. The user who is having the problem is using Excel 97 on Windows 98, in case this is important for you to know.

I just ran this script in my Excel to test it first, and I'm getting this error when I try to run it:

Microsoft Visual Basic
Run-time error '424';
Object Required.

Am I missing something? I just opened Excel with no files open and ran it in the VB editor window. Thanks.
 
Okay. With Excel closed:

Find the *.XLB file and delete it. Help? If not...do the registry edit given at under troubleshooting.

Your situation is unique because they deleted the toolbars from the system.

Anne Troy
Word and Excel Macros
Coming soon: wX
 
Actually I got it to work and forgot to tell you all what I did. I looked up that error message and I just had to run the script from within the spreadsheet as a VBA macro. It didn't like the Alt+F11 way of opening the VBA area.

The Help says that you don't have to include the object qualifiers when referenceing a method as long as you run it from within an internal form or something like that....

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top