|
|
Title | Keep track of the last control to have the focus |
Keywords | focus |
Categories | Controls |
|
|
In each control's GotFocus event handler, save the current and last controls to have focus.
|
|
Private Sub Text2_GotFocus()
Set LastControl = CurrentControl
Set CurrentControl = Text2
ShowControls
End Sub
|
|
Alternatively you could save each control's name in its LostFocus event handler.
See also Keep track of the last control to have the focus before a button is pressed.
|
|
|
|
|
|