Checking a userform for blanks
For Each ctl In Me.Controls
If TypeName(ctl) = "TextBox" Then
If ctl.Text = "" Then
Msgbox "Missing answer"
Exit For
End If
End If
Next ctl
--
HTH
RP
(remove nothere from the email address if mailing direct)
"WillRn" wrote in message
...
Does anyone know of a web site, tutorial, or bit of code I can attach to a
button to check its userform for blanks (no entry). I would like form to
check to see if there are any missing answers and if every question has
been
answered, then it posts the values to the spreadsheet.
I've tried a few things , and made a lot of searches, but all for naught.
Thanks,
WillRn
|