Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Saving CommandBars | Excel Discussion (Misc queries) | |||
Disable Commandbars | Excel Programming | |||
How to attach commandbars with VBA | Excel Programming | |||
CommandBars | Excel Programming | |||
Built In CommandBars | Excel Programming |