So I have 4 text boxes within a userform and the user MUST enter something in each text box. How do I code a data validation so that all 4 textboxes must be filled when I hit the "Next" button?
My current code:
Private Sub cmdNext_Click()
If txtProjectTitle = "" Then
MsgBox "Please enter Project Title"
If txtDate.Text = "" Then
MsgBox "Please enter a date"
If txtProjectDuration = "" Then
MsgBox "Please enter Project Duration"
If txtClientName = "" Then
MsgBox "Please enter Client Name"
Else
frmPriceMaster.Hide
frmList.Show
End If
End Sub
Currently it gives me a "Block if without end if" error. Can someone help me? Thanks.
Bookmarks