Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How to permanently delete a custom toolbar

Windows XP
Excel 2002 & 2003

Back when I was first learning VBA I made my own custom toolbar and added a
few buttons to it. It was created via right clicking on an existing toolbar
and choosing Customize..., not programmatically. The buttons didn't
actually do anything though. Anyway, it seems I have unknowingly spread
this toolbar around the office. How would I permanently delete this
innocuous little monster? I tried the code below and it didn't work, but it
didn't give an error either:

Sub MyCleanup()

dim cbar as CommandBar

For Each cbar In CommandBars
If cbar.Name = "MyBar" Then
cbar.delete
MsgBox "Toolbar ""MyBar"" deleted."
Exit Sub
End If
Next cbar

MsgBox "Toolbar ""MyBar"" not found."

Exit Sub


Any help greatly appreciated!

-gk-


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default How to permanently delete a custom toolbar

Hi 39N95W (nice name)

You can find your answer in this article and a lot more

http://support.microsoft.com/default...02&Product=xlw
How to customize menus and menu bars in Excel

--
Regards Ron de Bruin
http://www.rondebruin.nl


"39N95W" wrote in message ...
Windows XP
Excel 2002 & 2003

Back when I was first learning VBA I made my own custom toolbar and added a
few buttons to it. It was created via right clicking on an existing toolbar
and choosing Customize..., not programmatically. The buttons didn't
actually do anything though. Anyway, it seems I have unknowingly spread
this toolbar around the office. How would I permanently delete this
innocuous little monster? I tried the code below and it didn't work, but it
didn't give an error either:

Sub MyCleanup()

dim cbar as CommandBar

For Each cbar In CommandBars
If cbar.Name = "MyBar" Then
cbar.delete
MsgBox "Toolbar ""MyBar"" deleted."
Exit Sub
End If
Next cbar

MsgBox "Toolbar ""MyBar"" not found."

Exit Sub


Any help greatly appreciated!

-gk-




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
permanently delete toolbar rrChuck Excel Discussion (Misc queries) 2 October 28th 09 01:44 PM
How do I permanently delete a custom toolbar in Excel? Argee Excel Worksheet Functions 5 July 27th 07 11:05 PM
Can't delete custom button and toolbar Ron de Bruin Excel Programming 1 March 1st 04 09:46 PM
How to permanently delete a custom toolbar? TBA[_2_] Excel Programming 3 January 5th 04 10:38 PM
delete custom toolbar billQ Excel Programming 1 July 30th 03 03:50 PM


All times are GMT +1. The time now is 05:15 AM.

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

About Us

"It's about Microsoft Excel"