Customized toolbars not being saved

G

Guest

I am running Win XP Pro with Office 2000 Pro. I have done all the updates to
Windows except SP2. Wont do that. I have too many older programs I need to
keep running. In Excel Created new customized toolbar. Edited Images.
Assigned working macros. Toolbar worked fine until i closed excel. Restart
Excel and go to exact same file. Toolbar not there. Go to show toolbars and
new toolbar is not even in the list. So opened up toolbar I ad brought over
from Office 97. It shows up in the list. Did a show toolbar. Fine. Executed
those and all macros worked fine, However, If I edit that toolbar the same as
the new one Excel does not save the changes to the Old toolbar either. Really
upsetting since I created a customized toolbar with 27 macro buttons changed
all the images assigned all the macros and then with one click it was al a
waste of time. Have created text boxes and hyperlinked them as a temporary
measure and they are working but I need the toolbar so i can use it in
several other documents too. HELP!!!
 
J

Jan Karel Pieterse

Hi Hankster,
In Excel Created new customized toolbar. Edited Images.
Assigned working macros. Toolbar worked fine until i closed excel. Restart
Excel and go to exact same file. Toolbar not there.

Maybe these notes may help you find the problem?

Excel keeps toolbar and menubar customizations in a file with the extension
.xlb. The exact filename depends on Excel version and install, but usually
is: Excel9.xlb or Excel.xlb or Username8.xlb.
Often this file can be found in your WINDOWS directory.

You can attach a toolbar to a workbook. When this workbook is loaded, XL
checks if the toolbar is on the system. If not, it copies the toolbar from
the workbook to the system.

After creating *or changing* the toolbar, you should attach the toolbar to
your workbook:

- activate the workbook to which you want to attach the toolbar
- Rightclick the toolbar, select 'customize'
- Click 'Attach' (Toolbars Tab)
- If the workbook already contains a toolbar by that name, delete it first by
clicking on it on the righthand side and choosing Delete.
- Select your toolbar (on the left) and press 'copy'
- Save the workbook (optionally: save_as an add-in).

Also, you should include code that deletes the toolbar when your workbook or
add-in is closed, so that when you deliver a new version of your workbook the
new toolbar will be used i.s.o the old one. You can do that in the
Thisworkbook module, using the Workbook_BeforeClose event:

Private Sub Workbook_BeforeClose(Cancel as Boolean)
On Error Resume Next 'In case Toolbar is absent
Application.CommandBars("YourBarsName").Delete
End Sub

Regards,

Jan Karel Pieterse
Excel MVP
www.jkp-ads.com
 

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