ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Click Event (https://www.excelbanter.com/excel-programming/284370-click-event.html)

Nichevo

Click Event
 
Hope someone has a solution for me.

I want to create one macro that responds to clicks from several buttons/shapes and knows which particular button was clicked to run the macro.

Thanx

Doug Glancy

Click Event
 
Nichevo,

You can use something like the following with shapes or buttons from the
forms toolbar. Just right-click on the button or shape and assign the
macro:

Sub who_called()
MsgBox Application.Caller
End Sub

hth,

Doug

"Nichevo" wrote in message
...
Hope someone has a solution for me.

I want to create one macro that responds to clicks from several

buttons/shapes and knows which particular button was clicked to run the
macro.

Thanx




Nichevo

Click Event
 
Arr yes thats exactly what I was looking for

Thanx Doug


All times are GMT +1. The time now is 01:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com