Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Customized Toolbar

2 views
Skip to first unread message

T Collins

unread,
Mar 12, 2003, 8:43:30 AM3/12/03
to

Hey everybody.

If anybody has an answer that would be great. I spent a lot of time
customizing my toolbar and putting incons for macros, etc. Well that worked
out great for a while. This moring I opening up excel and my toolbar was
back at the default one. Is there an option somewhere that I don't know
about or is it officially gone. Thanks a lot

Tim C.


safety

unread,
Mar 12, 2003, 8:55:29 AM3/12/03
to
After extensively customizing my own and getting burnt, I
now create my own toolbars and just display them. In the
customize dialog box, click on New... and create away.


>-----Original Message-----
>I spent a lot of time customizing my toolbar and putting

>in icons for macros, etc. Well that worked out great
>for a while. This morning I opening up excel and my
>toolbar was back at the default one. Tim C.

Jan Karel Pieterse

unread,
Mar 12, 2003, 8:58:08 AM3/12/03
to
Hi,

Your toolbars and customisations to them are kept in a
file with the extension ".xlb".

You can also 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()
On Error Resume Next 'In case Toolbar is absent
Application.CommandBars("YourBarsName").Delete
End Sub

Regards,

Jan Karel Pieterse
Excel TA/MVP

>.
>

Dave Peterson

unread,
Mar 13, 2003, 1:10:06 AM3/13/03
to
Jan Karel,

I've pointed at your explanation a few times (via google). The last time, the
OP had trouble with your before_close macro.

They got this error: "Procedure declaration does not match description of event
or procedure having same name"

So this minor modification may avoid future problems:

Change this line:
Private Sub Workbook_beforeClose()
to:
Private Sub Workbook_BeforeClose(Cancel As Boolean)

--

Dave Peterson
ec3...@msn.com

Jan Karel Pieterse

unread,
Mar 13, 2003, 8:55:06 AM3/13/03
to
Hi Dave

Thanks!

Regards,

Jan Karel Pieterse
Excel MVP

0 new messages