gravanoc
Active Member
- Joined
- Oct 20, 2015
- Messages
- 348
- Office Version
- 365
- Platform
- Windows
- Mobile
My UserForm has a ton of controls and events, so it would be helpful if there was a guaranteed way to refer to the control whose event is currently running.
Application.Caller doesn't work, it returns Error 2023 in many cases. The ActiveControl option seems better suited, but frames complicate it. For example, I have a textbox that is on a frame within a frame, so to refer to that control when the event's code is running requires Me.ActiveControl.ActiveControl.ActiveControl.Name. Is there a better way?
Application.Caller doesn't work, it returns Error 2023 in many cases. The ActiveControl option seems better suited, but frames complicate it. For example, I have a textbox that is on a frame within a frame, so to refer to that control when the event's code is running requires Me.ActiveControl.ActiveControl.ActiveControl.Name. Is there a better way?