Empty toolbars

J

Jeff Harbin

I created a VBA macro that deleted every item in every one of my toolbars.
Obviously, that's not what I wanted it to do and I've reset all he standard
toolbars provided with Excel. However, now when I try to bring up the
'right-click' menu bar; it comes up but there are no commands in it. All I
get is a blank grey box. It's the pop-up menu minus any commands.

I've tried repairing my Office installation, I've uninstalled and
reinstalled with no success at retrieving the pop-ups. I even tried
rebuilding them manually using the Customize option for Excel toolbars but
the pop-ups can't be modified in the same way that all the others are.

Can somebody help me fix my screw up?

Jeff
 
B

Bernie Deitrick

Jeff,

Try this:

Sub ResetAllCommandbars()
Dim CmdBar As CommandBar
For Each CmdBar In Application.CommandBars
CmdBar.Reset
Next CmdBar
End Sub

HTH,
Bernie
MS Excel MVP
 
R

Ron de Bruin

Do you men if you right click on a cell?

Sub resetCellmenu()
With Application.CommandBars("Cell")
.Reset
.Enabled = True
End With
End Sub

Or right click on one of your Toolbars to get a list off all your toolbars

Then use this

Application.CommandBars("toolbar list").Enabled = True
 
T

Tom Ogilvy

Menu customizations are stored in your *.xlb file. It usually is named
excel.xlb. I am using xl2000 and it is in C:\Documents and
Settings\ogilvtw\Application Data\Microsoft\Excel

If you rename this to something like ExcelOld.Old or move it somewhere else,
you should get the default menus. If you then customize these, a new xlb
file will be created.

In xl97, the file was located in the windows subdirectory. It might be
named UserId.xlb (your userid).
 
J

Jeff Harbin

Yep. Thanks very much. This is how I corrected the problem.

I actually figured it out myself from Microsoft's website. Yesterday when I
did a search I used "toolbars" and didn't find what I was looking for. This
morning I tried "pop-up menus" and found an article that helped me.

Thanks for the help and sorry for the unnecessary post.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top