Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Consider naming your shapes with the address of the cell they're supposed to
be over. Then you can just use: Msgbox Activesheet.Range(Application.Caller).Value Tim "SpaceCamel" wrote in message ... Just what I was looking For. Thanks guys. '-------------------------- One more thing... I now need to get the value of the cell that the shape is over. ----- The shapes were added with this code to put them over the correct cell. With thiscell With .Parent.Shapes.AddShape( _ Type:=msoShapeRoundedRectangle, _ Left:=.Left + 2, _ Top:=.Top, _ ====================================== "Tom Ogilvy" wrote: Assume you mean buttons from forms toolbar. Sub Button_click() Dim sName as String, btn as Button sname = Application.Caller set btn = Activesheet.Buttons(sname) msgbox btn.Caption End Sub If you mean a picture that looks like a button, the approach would be similar but you couldn't use the buttons collection -- Regards, Tom Ogilvy "SpaceCamel" wrote: I have many graphical buttons on a sheet with different names/properties but all initiate the same macro. I need the macro to get the name/properties of the initiating button. Is there a "who started me" value I can get? Thanks, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro not showing in Tools/Macro/Macros yet show up when I goto VBA editor | Excel Programming | |||
Need syntax for RUNning a Word macro with an argument, called from an Excel macro | Excel Programming | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |