Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Toolbar lives on

Well I have now created a lovely little toolbar. My
problem, when I close the document, the toolbar still
stays open. Plus when I try to reopen the file, it yells
at me for having the toolbar there since it is trying to
create it.

I am sure it is a simple little line of code, I just can't
seem to get it.

Thanks

Sharon
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Toolbar lives on

In the macro/event that create the toolbar use this code to delete the
toolbar if it exist first before you create it

On Error Resume Next
Application.CommandBars("MyToolBar").Delete
On Error GoTo 0

Run the same code in the event or macro that you run when you cose the workbook


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"SS" wrote in message ...
Well I have now created a lovely little toolbar. My
problem, when I close the document, the toolbar still
stays open. Plus when I try to reopen the file, it yells
at me for having the toolbar there since it is trying to
create it.

I am sure it is a simple little line of code, I just can't
seem to get it.

Thanks

Sharon



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Toolbar lives on

You guys are all just the best!

Thanks




-----Original Message-----
In the macro/event that create the toolbar use this code

to delete the
toolbar if it exist first before you create it

On Error Resume Next
Application.CommandBars("MyToolBar").Delete
On Error GoTo 0

Run the same code in the event or macro that you run when

you cose the workbook


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"SS" wrote in

message ...
Well I have now created a lovely little toolbar. My
problem, when I close the document, the toolbar still
stays open. Plus when I try to reopen the file, it

yells
at me for having the toolbar there since it is trying to
create it.

I am sure it is a simple little line of code, I just

can't
seem to get it.

Thanks

Sharon



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Toolbar lives on

Before creating a commandbar it's a good idea to delete it:

Sub DeleteMyBar()
On Error Resume Next
Commandbars("MyBar").Delete
End Sub
--
Jim Rech
Excel MVP


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chart.Name lives forever? cate Charts and Charting in Excel 3 April 5th 10 01:00 PM
Form Toolbar verses Control Toolbar ub Excel Discussion (Misc queries) 3 July 11th 08 10:57 PM
Is it possible to ask a chart which worksheet its data lives on? Chrisso Charts and Charting in Excel 1 August 13th 07 07:48 PM
Adjusting toolbar size, restore toolbar Josh M Excel Discussion (Misc queries) 1 January 18th 06 06:17 PM
HALF-LIVES FOR A CURVE im_1 Charts and Charting in Excel 2 November 28th 05 08:17 PM


All times are GMT +1. The time now is 07:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"