View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Toolbar Button Coordinates

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


"Zone" wrote in message
oups.com...
On Mar 24, 3:53?pm, "Tom Ogilvy" wrote:
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

"Zone" wrote in message

...



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- Hide quoted text -


- 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