ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Buttons click in Code (https://www.excelbanter.com/excel-programming/339665-buttons-click-code.html)

Bettergains

Buttons click in Code
 
Hello:

I realize I can code a button's click event, but would really like to be
able to use a select case statement to take action based on which button is
clicked. This would then be called in the button's click event. Can this be
done? How?

Thanks, Germaine

Jim Rech

Buttons click in Code
 
If you use a button from the Forms toolbar you can do this:

Select Case Application.Caller ''Name of button

--
Jim
"Bettergains" wrote in message
...
Hello:

I realize I can code a button's click event, but would really like to be
able to use a select case statement to take action based on which button
is
clicked. This would then be called in the button's click event. Can this
be
done? How?

Thanks, Germaine





All times are GMT +1. The time now is 05:14 PM.

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