the line highlighted in red gives error "Invalid Qualifier".
I have created a Userform for filling data. Below is the screenshot of it.
I have created a Userform for filling data. Below is the screenshot of it.
Rich (BB code):
Dim everythingfilledin As Boolean
everythingfilledin = True
For Each c In Me.Controls
If TypeOf c Is msforms.TextBox Then
If c.Value = "" Then
c.BackColor = rgbPink
everythingfilledin = False
Else
c.BackColor = rgbWhite
End If
End If
Next c
If Not everythingfilledin Then Exit Sub
If Not IsDate(DOB.Value) Then
MsgBox "PLEASE ENTER A VALID DATE.", vbCritical
DOB.SetFocus
Exit Sub
Else
DOB.BackColor = rgbWhite
End If
With Sheet2.Range("A1048576").End(xlUp)
.Offset(1, 0).Value = Name.Value
.Offset(1, 1).Value = DOB.Value
.Offset(1, 2).Value = Gender.Value
.Offset(1, 3).Value = PartnerGender.Value
End With
MsgBox "Thanks, " & Name.Value & ", Your application was successful!", vbInformation
Unload Me
End Sub