Discussion:
Precisely Docking Custom Toolbars
(too old to reply)
John T Ingato
2005-03-12 16:32:06 UTC
Permalink
I have created an addin that creates on CommandBar with one button control
to run it.

In a code module I have written the creation and settins methods which are
call by code inside:
ThisWorkbook Sub Workbook_Open()

When I wrote the setting for the toolbar, I included position setting

With TBar
.Name = CBarName
.Top = 0
.Left = 0
.Visible = True
End With

which creates a floating toolbar in the top left.

So I tried NOT using the . top and .left and instead using

.position = msoBarTop

But that just centers the toolbar on screen.

How can I dock a custom toolbar into Excel's already present area up top.
What is that area called? and How do I access it?
jb
2005-03-16 15:22:32 UTC
Permalink
Post by John T Ingato
I have created an addin that creates on CommandBar with one button control
to run it.
In a code module I have written the creation and settins methods which are
ThisWorkbook Sub Workbook_Open()
When I wrote the setting for the toolbar, I included position setting
With TBar
.Name = CBarName
.Top = 0
.Left = 0
.Visible = True
End With
which creates a floating toolbar in the top left.
So I tried NOT using the . top and .left and instead using
.position = msoBarTop
But that just centers the toolbar on screen.
How can I dock a custom toolbar into Excel's already present area up top.
What is that area called? and How do I access it?
Hi John,
Try Position = 1. That should enter the new commandbar below the main
bars in word but docked in the same way they are.

HTH
J

Loading...