Hi,

Instead of run SetFocus on a single TextBox, can we add-in more than one?

I want the user to enter at least 2 TextBox, otherwise the form will display error message.


I have tried this code, but it only works on the 1st TextBox,

If Trim(Me.TextBox_EvaName.Value) = "" And Trim(Me.TextBox_SheetName.Value) = "" Then
   
    Me.TextBox_EvaName.SetFocus
    Me.TextBox_SheetName.SetFocus
    MsgBox "You must enter at least Name & Sheet Name", vbCritical, "Incomplete Form"
    Exit Sub
End If