Force CommandBar Position

M

Matthew Pfluger

I maintain an add-in on my employer's shared drive. Currently, when users
who have installed my add-in launch Excel, the add-in deletes its toolbar and
rebuilds it to ensure they are alway using the most recent version.

However, the code is not remembering the previous location of the toolbar.
It is simply forcing it to msoBarTop. I tried to read, store, and set the
..Top and .Left properties of the toolbar; however, my toolbar cannot dock
itself onto the same bar as other toolbars using this method. Is there a way
around this?

Thanks,
Matthew Pfluger
 
J

Jim Cone

RowIndex is what you want and is used something like this...
MyBar.RowIndex = Application.CommandBars("Formatting").RowIndex
MyBar.Left = Application.CommandBars("Formatting").Width
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




"Matthew Pfluger"
<[email protected]>
wrote in message
I maintain an add-in on my employer's shared drive. Currently, when users
who have installed my add-in launch Excel, the add-in deletes its toolbar and
rebuilds it to ensure they are alway using the most recent version.
However, the code is not remembering the previous location of the toolbar.
It is simply forcing it to msoBarTop. I tried to read, store, and set the
..Top and .Left properties of the toolbar; however, my toolbar cannot dock
itself onto the same bar as other toolbars using this method. Is there a way
around this?
Thanks,
Matthew Pfluger
 

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

Top