Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi There,
I have added a Toolbar ("Sige") to a workbook. How to make this toolbar visible on opening and remove it on closing the workbook. Keeping all the present Toolbars! Brgds Sige |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Use this to call your bar and assign macros to the buttons on it and th one below to remove toolbar! Sub Auto_Open() With Application .CommandBars("YOUR BAR NAME").Visible = True .CommandBars("YOUR BAR NAME").Controls("BUTTON NAME").OnActio = "MACRO NAME" .CommandBars("YOUR BAR NAME").Controls("BUTTON NAME").OnActio = "MACRO NAME" .DisplayFullScreen = False End With End Sub Sub cleanupmenubar() On Error Resume Next Application.CommandBars("YOUR BAR NAME").Controls.Delete On Error GoTo 0 End Sub Untested but should work! Hope this helps! Simo -- Simon Lloy ----------------------------------------------------------------------- Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670 View this thread: http://www.excelforum.com/showthread.php?threadid=47169 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Simon,
The Loading goes fine ...but the "cleanupmenubar" returns Error: "Method or data member not found" on ".Delete" This works though: Application.CommandBars("UpdateReportName").Visibl e = False Thx, Sige Sub Auto_Open() With Application ..CommandBars("UpdateReportName").Visible = True ..CommandBars("UpdateReportName").Controls("&Excha nge Folder...").OnAction = "ShowDialog" '.CommandBars("UpdateReportName").Controls("&Excha nge Folder...").OnAction = "MACRO NAME" ..DisplayFullScreen = False End With End Sub Sub cleanupmenubar() On Error Resume Next Application.CommandBars("UpdateReportName").Contro ls.Delete On Error GoTo 0 End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Toolbar for a specific workbook | Excel Worksheet Functions | |||
Attaching a toolbar to a workbook | Excel Discussion (Misc queries) | |||
Toolbar for a specific workbook | Excel Discussion (Misc queries) | |||
Toolbar on opening a workbook | Excel Programming | |||
Workbook-specific toolbar possible? | Excel Programming |