#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default CommandBars

Hi Garry,

Private Sub Workbook_AddinInstall()
'create PERMANENT toolbar
Dim cbar As CommandBar, cbct1 As CommandBarControl

MsgBox "install myAppTB"

'create myApptool bar as permanent

'error in next line- Me is wrong, so is Application, what should it be?
Set cbar = Me.CommandBars.Add("MyAppTB", msoBarTop, False, False)


Application should work fine. Normally, I'd delete the toolbar
beforehand, just in case it's already the

On Error Resume next
Application.Commandbars("MyAppTB").Delete

On Error Goto 0
Set cbar = Me.CommandBars.Add("MyAppTB", msoBarTop, False, False)


Private Sub Workbook_AddinUninstall()
'delete PERMANENT toolbar
MsgBox "Uninstall myappTB"
'have not figured this out yet"


On Error Resume next
Application.Commandbars("MyAppTB").Delete

End Sub



Hope that helps

Regards

Stephen Bullen
Microsoft MVP - Excel
www.BMSLtd.ie


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
Saving CommandBars DRA Excel Discussion (Misc queries) 0 November 21st 06 11:28 PM
Disable Commandbars [email protected] Excel Programming 1 May 19th 04 07:29 AM
How to attach commandbars with VBA Carsten[_2_] Excel Programming 1 December 9th 03 12:55 PM
CommandBars defj Excel Programming 2 November 16th 03 12:57 AM
Built In CommandBars Sander Lablans Excel Programming 0 August 1st 03 11:59 AM


All times are GMT +1. The time now is 01:21 AM.

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"