PDA

View Full Version : Custom Toolbar Size/Shape



rsilberfarb
09-05-2006, 11:31 AM
I have 2 custom toolbars created with VBA in an excel sheet.

Not matter what I put for tbar width/hight, they always just come in one button high, and as long as it takes to show all the buttons.

I would like it to be one button wide, and be as tall as it needs to be to fit the buttons.

I hope this makes sense, and there is a way to do this.

Please Help!

Ross

Desert Piranha
09-05-2006, 03:33 PM
I have 2 custom toolbars created with VBA in an excel sheet.

Not matter what I put for tbar width/hight, they always just come in one button high, and as long as it takes to show all the buttons.

I would like it to be one button wide, and be as tall as it needs to be to fit the buttons.

I hope this makes sense, and there is a way to do this.

Please Help!

RossHi,
Does one of these help?

'Position
'msoBarTop
'msoBarBottom
'msoBarLeft
'msoBarRight,
'msoBarFloating
'msoBarPopup
'msoBarMenuBar

ALe
09-06-2006, 12:12 AM
Toolbars generally are vertical oriented if positioned on the left or right side of the screen (position=msoBarLeft/Right) and horizontal oriented if positioned at the top or Bottom (position=msoBarTop/Bottom).

ALe
09-06-2006, 04:58 AM
Maybe I got your point now. this code should create a vertical bar as you want
Sub a()
Application.CommandBars.Add ("a")
For i = 1 To 10
Application.CommandBars("a").Controls.Add
Next i
Application.CommandBars("a").Visible = True
Application.CommandBars("a").Width = 0
End Sub