PDA

View Full Version : Identifying Object that initiated VBA sub-routine



Randy M
08-03-2015, 09:05 AM
My spreadsheet has multiple objects all of which lauch the same sub-routine.
How can this subroutine identify which object was selected by the user to launch it?

Paul_Hossler
08-03-2015, 01:50 PM
If you're using Form controls as opposed to ActiveX, you can use Application.Caller to return the name

Randy M
08-04-2015, 04:57 AM
Your suggestion worked perfectly! Simple and accurate answer. Thank you so much Paul!