Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Initial position of floating toolbar
Excel XP & Win XP
I got some code from VBAExpress.com to create a floating toolbar on file opening and it works well. My problem is that the sheet that is on the screen is a busy sheet and the initial position of the toolbar can easily bury the toolbar in the sheet clutter. I would like to specify the initial position of the toolbar, then the user can move it as he wishes. How can I specify the initial position of the tool bar? The toolbar is Commandbars("My Toolbar"). Thanks for your time. Otto |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Initial position of floating toolbar
Try something like the following. The command bar will be on the same row as
the Standard command bar. Commented code shows how to place it on the first or last row of command bars. Sub AAA() Dim CmdBar As Office.CommandBar Dim Ctrl As Office.CommandBarButton On Error Resume Next Application.CommandBars("Test").Delete On Error GoTo 0 Set CmdBar = Application.CommandBars.Add(Name:="Test", Position:=msoBarTop) 'CmdBar.RowIndex = msoBarRowFirst ' or msoBarRowLast CmdBar.RowIndex = Application.CommandBars("Standard").RowIndex CmdBar.Visible = True Set Ctrl = CmdBar.Controls.Add(Type:=msoControlButton) Ctrl.Caption = "Click Me" End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel, 10 Years Pearson Software Consulting www.cpearson.com (email on the web site) "Otto Moehrbach" wrote in message ... Excel XP & Win XP I got some code from VBAExpress.com to create a floating toolbar on file opening and it works well. My problem is that the sheet that is on the screen is a busy sheet and the initial position of the toolbar can easily bury the toolbar in the sheet clutter. I would like to specify the initial position of the toolbar, then the user can move it as he wishes. How can I specify the initial position of the tool bar? The toolbar is Commandbars("My Toolbar"). Thanks for your time. Otto |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Floating toolbar and floating comment? | Excel Programming | |||
floating toolbar | Excel Programming | |||
Get floating CommandBar position | Excel Programming | |||
Floating Toolbar | Excel Discussion (Misc queries) | |||
floating toolbar | Excel Programming |