Commandbar shows vertically instead of horizontally

C

Charles Chung

I need to write some marcos in a excel file that need to be
cross-platform compatible.

I have this VBA code:
CommandBars.Add "PurchaseOrder", msoBarTop

The problem is the commandbar shows vertically instead of horizontally
in Mac Excel 2004, but it shows properly in Office XP!

Do anyone knows why is that?

Thanks you!

Charles Chung
 
J

JE McGimpsey

The problem is the commandbar shows vertically instead of horizontally
in Mac Excel 2004, but it shows properly in Office XP!

Do anyone knows why is that?

I can't reproduce that - the new commandbar is horizontal when I perform
the .Add method.

Try, with XL closed, renaming or deleting the

~:Library:preferences:Microsoft:Excel Toolbars (11)

file.
 
J

Jim Gordon MVP

Hi Charles,

You need to specify more parameters to make sure the commandbar comes
out horizontal. Here's a snippet of code I use for one of my commandbars:

MyBar.Position = msoBarTop
With MyBar
.Height = 31
.Width = 175
.Top = 90
.Left = 225
.Visible = True
End With

-Jim
 
Top