kennedymr2
Programmer
I have a form with a large number of text boxes on it
approx 200...
Trying to avoid repeating the on_click code 200 times eg..
Private Sub Text_1_1_Click()
Private Sub Text_1_2_Click()
etc............
I have tried the Form....on_click to detect a click and then work out which control has focus, but the event click does not seem to work..
What i tried was ......
Private Sub Form_Click()
Dim ctlCurrentControl As Control
Dim strControlName As String
Set ctlCurrentControl = Screen.ActiveControl
strControlName = ctlCurrentControl.Name
MsgBox (strControlName)
When i click on a text box, the above does not trigger...
Would appreciate any help with this idea....
Hope i have explained it clearly !!!!
Regards Kennedymr2
approx 200...
Trying to avoid repeating the on_click code 200 times eg..
Private Sub Text_1_1_Click()
Private Sub Text_1_2_Click()
etc............
I have tried the Form....on_click to detect a click and then work out which control has focus, but the event click does not seem to work..
What i tried was ......
Private Sub Form_Click()
Dim ctlCurrentControl As Control
Dim strControlName As String
Set ctlCurrentControl = Screen.ActiveControl
strControlName = ctlCurrentControl.Name
MsgBox (strControlName)
When i click on a text box, the above does not trigger...
Would appreciate any help with this idea....
Hope i have explained it clearly !!!!
Regards Kennedymr2