Center Toolbar
On Mar 31, 2:51�pm, Helmut Weber wrote:
Helmut, line
x = System.HorizontalResolution
gives me run-time error 424, object required. I am using Excel 2002
on Windows XP. James
Hi James,
When my workbook opens, I make all commandbars invisible except the
standard menubar and the workbook's custom toolbar. *I have the custom
toolbar in the right place vertically (just below the menubar). *How
do I center it horizontally? *TIA, James
for centering a toolbar:
Sub TestCenter()
Dim x As Long
Dim v As Long
v = Application.CommandBars("formatting").Width
x = System.HorizontalResolution
Application.CommandBars("formatting").Left = x / 2 - v / 2
End Sub
Though occasionally,
System.HorizontalResolution tells me,
that an ActiveX object could not be created.
Why? I don't know.
--
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
|