I have a UserForm, with over 100 controls, that is used to enter data into an Excel Worksheet. This includes a 'bank' of CommandButtons. As part of making this easier for the user, these have TakeFocusOnClick set to False.
This currently results in a lot of repetative code under the CommandButton[COLOR="Blue"]1..20[/COLOR] _Click() events.
Since TakeFocusOnClick is disabled ActiveControl does not return the CommandButton that initiated the event, but returns the ComboBox that I wish to keep focus since this makes it much faster for the user to enter data.
Is there a way to identify which CommandButton has initiated the Click event without using ActiveControl? I would want to pass that identifier to a procedure to process the Click event.