riskassure
Programmer
Hi,
Does anyone know the VBA code for the following question:
I have four buttons A, B, C, and D on an Excel spreadsheet. Each button is associated with a macro. But instead of four individual macros, I want to associate them with the same macro. When the button is clicked, the macro will run and a message box will display the name of the button. How do I do this? I tried using the code
Msgbox ActiveControl.Name
But it gave me an error message Run-time error '404': Object required.
Any help will be really appreciated!!
~~CW~~
Does anyone know the VBA code for the following question:
I have four buttons A, B, C, and D on an Excel spreadsheet. Each button is associated with a macro. But instead of four individual macros, I want to associate them with the same macro. When the button is clicked, the macro will run and a message box will display the name of the button. How do I do this? I tried using the code
Msgbox ActiveControl.Name
But it gave me an error message Run-time error '404': Object required.
Any help will be really appreciated!!
~~CW~~