PDA

View Full Version : Custom menu top left



Pixelpusher
10-22-2009, 04:59 AM
Hi all.
I have a custom menu that I call on loading and hide standard menus returning on closing workbook. The problem is I can not get my menu to position top left on opening it just floats in the middle. I have tried this code below but nothing. Any ideas please.:banghead:



Option Explicit

Sub Make_ChartToolbar_Float()
With Application.CommandBars("Wade")
.Left = 10
.Top = 200
.Protection = msoBarNoProtection
.Visible = True
.Position = msoBarFloating

End With
End Sub



Thanks

Aflatoon
10-22-2009, 05:12 AM
Have you tried docking it instead of floating it? (msoBarTop as Position)

xld
10-22-2009, 05:22 AM
Top left of where?

Pixelpusher
10-22-2009, 05:24 AM
Yes tried that it still sits in the middle of the toolbar well

Pixelpusher
10-22-2009, 05:27 AM
Hi Xld Top left of the window (toolbar Well)

Aflatoon
10-22-2009, 05:35 AM
Do you hide the standard menus before showing that one?

xld
10-22-2009, 05:39 AM
Hi Xld Top left of the window (toolbar Well)

Sorry, which window? What is 'toolbar well'?

Pixelpusher
10-22-2009, 05:47 AM
Sorry, which window? What is 'toolbar well'?

"Toolbar well" not sure the correct name but the area where toolbars snap into when dragged to top of screen or window.

xld
10-22-2009, 05:59 AM
Try something like


Sub Make_ChartToolbar_Float()
With Application.CommandBars("Wade")
.Left = 10
.Top = 200
.Protection = msoBarNoProtection
.Position = msoBarTop
.Left = Application.CommandBars("Formatting").Left _
+ Application.CommandBars("Formatting").Width
.RowIndex = Application.CommandBars("Formatting").RowIndex
.Visible = True
End With
End Sub