Toolbar Button Coordinates

  • Thread starter Thread starter Zone
  • Start date Start date
Z

Zone

My custom toolbar has a button that brings up a userform. I want the
userform to be centered horizontally over the button. Thing is, the toolbar
may be moved around or be displayed on PCs with widescreen monitors, etc.
How do I determine how to center the userform over the button? TIA, James
 
I guess I didn't read closely enough and assumed a button on a sheet. for a
commandbar, you can get the location:

(to illustrate from the immediate window)
? application.CommandBars("Mytb").Controls(r).Top
60

it also has attributes for Left, Height and Width

--
Regards,
Tom Ogilvy


http://www.cpearson.com/excel/FormPosition.htm

that is for a cell, but the button has a cell under it (topleftcell
attribue).

--
Regards,
Tom Ogilvy






- Show quoted text -

Thanks, Tom! What syntax do I use to get the address of the cell
under the 6th button on toolbar "mytb"? James
 

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

Back
Top