Userform, all fields required

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there,

I have a user form containing about 75 combo boxes. All cbo's require data
to be entered prior to the user submitting to the sheet log.

Question: Is there a script that loops through all fields and displays a
message if any boxes are missing data?
 
Dim ctrl as Object
for each ctrl in Userform1.Controls
if typeof ctrl is msforms.combobox then
if ctrl.Value = "" then
msgbox "Missing Data in " & ctrl.Name
exit sub
end if
end if
Next
 
Back
Top