I 2 simple lines of code I am currently using to show which control has the focus at any given moment. My problem is that with this code, I have to put it in for each control (of which there are many - some are hidden until other options are chosen). The code is this:
[blue]
Private Sub cmbOne_GotFocus()
cmbOne.BorderColor = vbBlue
End Sub
Private Sub cmbOne_LostFocus()
cmbOne.BorderColor = 52479
End Sub
[/blue]
I would like to be able to say something like :
[green]'where cmbCurrent simply stands for the active control[/green]
[blue]Private Sub cmbCurrent_GotFocus()
cmbCurrent.BorderColor = vbBlue
End Sub
Private Sub cmbCurrent_LostFocus()
cmbCurrent.BorderColor = 52479
End Sub[/blue]
[blue]
Private Sub cmbOne_GotFocus()
cmbOne.BorderColor = vbBlue
End Sub
Private Sub cmbOne_LostFocus()
cmbOne.BorderColor = 52479
End Sub
[/blue]
I would like to be able to say something like :
[green]'where cmbCurrent simply stands for the active control[/green]
[blue]Private Sub cmbCurrent_GotFocus()
cmbCurrent.BorderColor = vbBlue
End Sub
Private Sub cmbCurrent_LostFocus()
cmbCurrent.BorderColor = 52479
End Sub[/blue]