Hello All,

That's a mouthful!!

On my form I have several textboxes and an Exit button. If the user hits the exit button but after a Yes/No exit message the user decides not to exit, how can I return to the textbox I was in prior to the call?

I've tried Return, Iv'e tried Form1.Focus(), all I get is Form1 again and the cursor is nowhere to be seen, until I click on a textbox. My Exit code is below.

Code:
    Public Sub ExitProgram()

        Dim response As Integer

        response = MsgBox("End Program Now", vbYesNo + vbQuestion)
        If response = vbYes Then
            End
        ElseIf response = vbNo Then
            cancel = 1
        End If
        
    End Sub
Rgds,
Tarablue