Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In my workbook_open event, I call a sub contained in a module that creates a
custom toolbar: Sub CreateBar() ' This procedure creates a new temporary toolbar. Dim ComBar As CommandBar, ComBarContrl As CommandBarControl On Error GoTo ErrorHandler ' Create a new floating toolbar and make it visible. On Error Resume Next 'Delete the toolbar if it already exists CommandBars("NavBar").Delete Set ComBar = CommandBars.Add(Name:="NavBar", Position:=msoBarFloating, Temporary:=True) ComBar.Visible = True ' Create a button with text & icon on the bar and set some properties. Set ComBarContrl = ComBar.Controls.Add(Type:=msoControlButton, Parameter:="GoBackBtn") With ComBarContrl .Caption = "Go &Back" .Style = msoButtonIconAndCaption .TooltipText = "Go back to the previously viewed worksheet" 'the onaction line tells the button to run a certain macro .OnAction = "btnGoBack" .Width = "85" .FaceId = 41 End With Exit Sub ErrorHandler: MsgBox "Error " & Err.Number & vbCr & Err.Description Exit Sub End Sub I'd like the toolbar to launch 'undocked'. Yet every time I open the .xlsm, the toolbar is not only undocked, but it is in the 'Add-Ins' tab/ribbon/whatever, a location I dont' expect many users to find. What does the msoBarFloating option do, if not this? And if this is what it does, why isn't it working for me? Thanks, Steve |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can I have more than 1 custom toolbar add-in in Excel 2007? | Excel Discussion (Misc queries) | |||
Unable to see custom Ad-Ins ribbon tab in Excel 2007 + Windows 7 | Excel Worksheet Functions | |||
Need help w using custom image for custom toolbar in Excel 2007 | Excel Programming | |||
Creating a custom toolbar add-in in Excel 2007 | Excel Programming | |||
How do I set up a custom toolbar in Excel 2007? | Excel Discussion (Misc queries) |