Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have created an xla that adds a new menu to the worksheet menu bar at
startup, it allows me to access files. I can go into the Tools, addins menu and add the xla and it appears on the command bar. but when I close down excel and reopen it the addin does not appear. I had excel 2000 up to a few days ago and my addin worked perfectly but now that i have upgraded to excel 2002 i am having this problem. Can someone please help? thanks if you can. Here is my code. Private Sub Workbook_AddinUninstall() Call DeleteMenu End Sub Private Sub Workbook_AddinInstall() Call AddMenus End Sub Public Sub AddMenus() Dim cMenu1 As CommandBarControl Dim cbMainMenuBar As CommandBar Dim iHelpMenu As Integer Dim cbcCutomMenu As CommandBarControl On Error Resume Next Application.CommandBars("Worksheet Menu Bar").Controls("&Andy Files").Delete Set cbMainMenuBar = _ Application.CommandBars("Worksheet Menu Bar") iHelpMenu = _ cbMainMenuBar.Controls("Data").Index Set cbcCutomMenu = _ cbMainMenuBar.Controls.Add(Type:=msoControlPopup, befo=iHelpMenu) cbcCutomMenu.Caption = "&Andy Files" With cbcCutomMenu.Controls.Add(Type:=msoControlButton) .Caption = "&Limit Monitor" .OnAction = "OpenLimitMonitor" End With With cbcCutomMenu.Controls.Add(Type:=msoControlButton) .Caption = "&My Work" .OnAction = "OpenAndyWork" End With On Error GoTo 0 End Sub Public Sub DeleteMenu() On Error Resume Next Application.CommandBars("Worksheet Menu Bar").Controls("&Andy Files").Delete On Error GoTo 0 End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can I stop the EULA message appearing every time I start Excel? | Excel Discussion (Misc queries) | |||
personal.xls won't open when I start Excel | Excel Discussion (Misc queries) | |||
Start Excel from send menu | Excel Programming | |||
hide and restore personal display settings in excel menu | Excel Programming |