I have a form with a subform. The subform occupies about the bottom
two thirds of the screen. The form has a custom CommandBar docked at
the top. The subform also has its own CommandBar. I want to position
the subform's CommandBar just above the subform - that is about one
third down from the top, but I have been unable to get the effect I
want using the code below:
Dim cbrBar As CommandBar
Set cbrBar = Application.Com mandBars("cbrCW rdU")
With cbrBar
.Visible = True
.Position = msoBarFloating
.Top = 220
.Left = 10
End With
The problem is that with the Position property set to msoBarFloating,
the ConmmandBar is displayed with a grey title bar of its own showing
the name of the CommandBar and an X to close it. This is not what I
want. You do not get this with msoBarTop, msoBarBottom, etc.
I do not want a floating toolbar in the sense of one that can be
dragged around the screen and repositioned. I want to fix it
permanently in the chosen position. But as far as I can see, you have
to specify msoBarFloating, if you do not want Top, Bottom or either of
the two sides.
Adrian Chandler
two thirds of the screen. The form has a custom CommandBar docked at
the top. The subform also has its own CommandBar. I want to position
the subform's CommandBar just above the subform - that is about one
third down from the top, but I have been unable to get the effect I
want using the code below:
Dim cbrBar As CommandBar
Set cbrBar = Application.Com mandBars("cbrCW rdU")
With cbrBar
.Visible = True
.Position = msoBarFloating
.Top = 220
.Left = 10
End With
The problem is that with the Position property set to msoBarFloating,
the ConmmandBar is displayed with a grey title bar of its own showing
the name of the CommandBar and an X to close it. This is not what I
want. You do not get this with msoBarTop, msoBarBottom, etc.
I do not want a floating toolbar in the sense of one that can be
dragged around the screen and repositioned. I want to fix it
permanently in the chosen position. But as far as I can see, you have
to specify msoBarFloating, if you do not want Top, Bottom or either of
the two sides.
Adrian Chandler
Comment