C
Craigm
I create a toolbar that has three icons with the code below. When I
open the worksheet it appears at the bottom of the sheet on its own row
below the drawing tolbar.
Is it possible to have this toolbar open beside the drawing toolbar?
There is plenty of room and would give me a larger worksheet viewing
area.
Thanks,
Craig
Sub CreateAToolbar()
Const tBarName As String = "Service Maintenance"
'Delete CommandBar if it exists
On Error Resume Next
CommandBars(tBarName).Delete
On Error GoTo 0
'create CommandBar
CommandBars.Add Name:=tBarName
'define an object variable to refer to the CommandBar
With CommandBars(tBarName)
'add button use 1 to specify a blank custom face
With .Controls.Add(ID:=1)
..OnAction = "Inven1Import"
..FaceId = 9946
..Caption = "Inventory Import"
End With
With .Controls.Add(ID:=1)
..OnAction = "Mile1Import"
..FaceId = 9942
..Caption = "Mileage Import"
End With
With .Controls.Add(ID:=1)
..OnAction = "Master_Control"
..FaceId = 1763
..Caption = "Master Control"
..BeginGroup = True 'this adds the separator
bar
End With
'.Position = msoBarTop
..Position = msoBarBottom
..Visible = True 'display the toolbar
End With
End Sub
open the worksheet it appears at the bottom of the sheet on its own row
below the drawing tolbar.
Is it possible to have this toolbar open beside the drawing toolbar?
There is plenty of room and would give me a larger worksheet viewing
area.
Thanks,
Craig
Sub CreateAToolbar()
Const tBarName As String = "Service Maintenance"
'Delete CommandBar if it exists
On Error Resume Next
CommandBars(tBarName).Delete
On Error GoTo 0
'create CommandBar
CommandBars.Add Name:=tBarName
'define an object variable to refer to the CommandBar
With CommandBars(tBarName)
'add button use 1 to specify a blank custom face
With .Controls.Add(ID:=1)
..OnAction = "Inven1Import"
..FaceId = 9946
..Caption = "Inventory Import"
End With
With .Controls.Add(ID:=1)
..OnAction = "Mile1Import"
..FaceId = 9942
..Caption = "Mileage Import"
End With
With .Controls.Add(ID:=1)
..OnAction = "Master_Control"
..FaceId = 1763
..Caption = "Master Control"
..BeginGroup = True 'this adds the separator
bar
End With
'.Position = msoBarTop
..Position = msoBarBottom
..Visible = True 'display the toolbar
End With
End Sub