Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have embedded several buttons within different cells of
an Excel worksheet, all of which reference the same procedure upon clicking. Within the procedure I need to determine the cell location (BottomRightCell or TopLeftCell.. I think) of that button. Have searched knowledge base, Micorsoft help and text books to no avail. Any thoughts? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you mean buttons from the forms toolbar, and if you don't it is far
easier to do this with those buttons, you would use Application.Caller Sub Button_Click() sName = Application.Caller set btn = Activesheet.Buttons(sName) set rng = btn.TopLeftCell msgbox "you pressed " & sname & vbnewline & _ "located above cell: " & rng.address End Sub Then assign this macro to each of your buttons from the forms toolbar. Regards, Tom Ogilvy "Mike Lynch" wrote in message ... I have embedded several buttons within different cells of an Excel worksheet, all of which reference the same procedure upon clicking. Within the procedure I need to determine the cell location (BottomRightCell or TopLeftCell.. I think) of that button. Have searched knowledge base, Micorsoft help and text books to no avail. Any thoughts? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
go to worksheet on button name | New Users to Excel | |||
Moving a button on worksheet | Excel Worksheet Functions | |||
How do I put a toolbar button into a worksheet? | Excel Worksheet Functions | |||
How can I use the tab button after protecting the worksheet? | Excel Worksheet Functions | |||
print different worksheet by pressing visible button on worksheet | Excel Worksheet Functions |