Positioning of the toolbar

peljo

Registered User.
Local time
Today, 10:18
Joined
May 24, 2006
Messages
24
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 s not the right code.
Could someone help me ?
 

Users who are viewing this thread

Back
Top Bottom