Set custom ToolBar Position on Excel Loads default to zero value
I am writing an Excel Add-In that creates a custom toolbar on load
whose position is saved to the registry on exit.
However, whenever I place the toolbar on the 1st or 2nd row (usually
on the same row with the Standard & Formatting Excel Toolbars), the
Top position is properly stored into the registry as Long (23), but
when the application loads again, setting the toolbar .top property to
23 results in the toolbar being set to the value of 75. This happens
even though I am setting the Toolbar with a Long value of 23.
Excel 2000
VB6
Does anybody know anything about this? Is this because I am not
allowed to place a custom (or temporary) toolbar on the same row as a
built in Excel toolbar?
-- snip --
ToolbarTop = GetSetting(RegSettings.cToolBarTop)
If Not Len(ToolbarTop) 0 Then
oBar.Top = 100
End If
With oBar
.Position = ToolbarPosition
.Top = CLng(ToolbarTop)
.Left = CLng(ToolbarLeft)
.Visible = ToolbarVisibility
End With
-- snip --
Thanks,
John
|