I use the following code to create a toolbar:
Sub BuildCustomToolbar()
Dim oCmdBar As CommandBar
On Error Resume Next
'point to custom toolbar
Set oCmdBar = CommandBars("MyToolbar")
'if it doesn't exist create it
If Err <> 0 Then
Set oCmdBar = CommandBars.Add("MyToolbar")
Err = 0
With oCmdBar
'now add a control
..etc..etc
However the toolbar is placed in the middle of the screen.And i want it on the top of the screen, but i do not know the command.I tried with the following line :
Position:=msotop
But obvisouly this i sno the right code.
Could someone help me ?
Sub BuildCustomToolbar()
Dim oCmdBar As CommandBar
On Error Resume Next
'point to custom toolbar
Set oCmdBar = CommandBars("MyToolbar")
'if it doesn't exist create it
If Err <> 0 Then
Set oCmdBar = CommandBars.Add("MyToolbar")
Err = 0
With oCmdBar
'now add a control
..etc..etc
However the toolbar is placed in the middle of the screen.And i want it on the top of the screen, but i do not know the command.I tried with the following line :
Position:=msotop
But obvisouly this i sno the right code.
Could someone help me ?