View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
minimaster minimaster is offline
external usenet poster
 
Posts: 73
Default Screen position of commandbar button in Excel 2007 ?

I have some add-ins with custom commandbars that have buttons on them
that show a popup menu below the commandbar button when clicked . That
worked fine so far up to Excel 2003.
However in Excel 2007
Application.CommandBars.ActionControl.Top
and
Application.CommandBars.ActionControl.Left
does not deliver anymore the information about the screen position of
the clicked button, so as a consequence my popup menu does get
displayed at the wrong position in Excel 2007. Is there any
workaround, maybe with an Windows API call to get the position of the
commandbar button? I'm explicity interested in the position of the
commandbar button, not the position of the mouse click, because aI
have another button on the commandbar simulates a spinbutton control,
and for that I need to determine whether the mouse click was in the
upper or lower half of the "spin button" on the commandbar.