Userform, all fields required

C

Carlee

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?
 
T

Tom Ogilvy

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top