LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default custom command bar question

Answer to my own question:

Here's what I did:

Earlier when I posed my question, the macro I refered to in order t
test code validity was named Delete (how original!)...code as follows:

Sub Delete()
Dim cbWSMenuBar As CommandBar
On Error Resume Next
Set cbWSMenuBar = CommandBars("Worksheet Menu Bar")
cbWSMenuBar.Controls("Britannia").Delete
End Sub

the BeforeClose sub now looks like the following:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Call Delete
End Sub

Works just fine. Hope this helps someone.

Ro

--
Message posted from http://www.ExcelForum.com



 
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
custom command Ross in Oz[_2_] Excel Discussion (Misc queries) 0 February 18th 10 11:52 AM
Custom Command Bars barrowhill Excel Discussion (Misc queries) 1 March 29th 08 02:19 PM
Preventing Users from Modifying Custom Command Bars Vlad[_6_] Excel Programming 1 May 24th 04 08:04 PM
Embed Graphic onto custom command john m Excel Programming 0 April 6th 04 04:25 PM
Macro as Custom Menu Command Clint Marshall Excel Programming 6 September 26th 03 07:20 PM


All times are GMT +1. The time now is 12:36 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"