Docking custom toolbars with BuiltIns

J

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
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?
 
C

Cindy M -WordMVP-

Hi John,

The reason you may not have gotten a response before now is that this is a
WORD.Vba group. Although CommandBars should be the same in all Office
applications, at least in this respect.

As far as I know, if you set the .Position = msobartop it should dock at the
top of the Excel window. msobarfloating should position it "over the sheet".
If that's not the case, you do need to check with the folks in
excel.programming.
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?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top