Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Initiating a Custom Toolbar
I have code that creates a custom toolbar, adds a button to it and assigns a
macro to that button. How do I initialize the toolbar/button when the spreadsheet is opened. Also, once the toolbar/button has been loaded once it doesn't need to run everytime the spreadsheet is open so I need a way to check for the toolbar in excel, if it's there do nothing, if not I need it to run. I have included my code below. Sub CatalystDumpToolBar() Dim CDToolBar As CommandBar Set CDToolBar = CommandBars.Add(temporary:=True) With CDToolBar .Name = "CDToolBar" .Position = msoBarTop .Visible = True End With End Sub Sub AddCustomControl() Dim CBar As CommandBar Dim CTTally As CommandBarControl Set CBar = CommandBars("CDToolBar") Set CTTally = CBar.Controls.Add(Type:=msoControlButton) With CTTally .FaceId = 1763 .OnAction = "CatalystToTally" End With CBar.Visible = True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Initiating a Custom Toolbar | Excel Programming | |||
hide custom toolbar from Toolbar list | Excel Programming | |||
Need help w using custom image for custom toolbar in Excel 2007 | Excel Programming | |||
custom toolbar buttons are saved where? Excel loads twice bymistake and all my custom toolbar buttons get gone!!! | Excel Programming | |||
saving toolbar buttons on custom toolbar | Excel Programming |