Excel 2003 - VBA - ToolBar Release

C

C Brandt

Thanks to all your help, I now have a functioning toolbar that makes life a
lot easier for my users.

But...

now that I have it, how do I get rid of it?

I tried :

Private Sub WorkbookBeforeClose()
Application.CommandBars("Account Review").Visible = False
End Sub

in the "ThisWookbook" object, but that does not seem to be doing the job.
The toolbar is always hanging around unless I go and manually uncheck it in
the toolbars menus.

I would like it to be available when the workbook is open and closed when
the workbook is closed.

Thanks for any help,
Craig
 
D

Dave Peterson

See those dropdowns at the top of the code window.

You can use them to choose the name of the procedure you want to use--you don't
have to type it yourself and take a chance of a typo:

Private Sub Workbook_BeforeClose(Cancel As Boolean)

or was this a typo in the newsgroup post?????
 
C

C Brandt

Thanks for the input.
Wherever I looked, I kept seeing WorkbookBeforeClose without the dash. I
never realized that "thisworkbook" was already preloaded with the procedures
setup.
Thanks again,
Craig
 

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