chrisjames25
Registered User.
- Local time
- Today, 03:24
- Joined
- Dec 1, 2014
- Messages
- 401
HI.
I am trying to reference the active control in a form in a module but keep getting an error stating control needs to be in active window.
Instead of screen.activecontrol how could i refernece the current active form?
I am trying to reference the active control in a form in a module but keep getting an error stating control needs to be in active window.
Code:
Dim ctlCurrentControl As Control
Dim strControlName As String
Set ctlCurrentControl = Screen.ActiveControl
strControlName = ctlCurrentControl.Name
ctlCurrentControl.ForeColor = vbRed
Instead of screen.activecontrol how could i refernece the current active form?