ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Userform, all fields required (https://www.excelbanter.com/excel-programming/391176-userform-all-fields-required.html)

Carlee

Userform, all fields required
 
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?

--
Carlee

Tom Ogilvy

Userform, all fields required
 

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

--
Regards,
Tom Ogilvy

"Carlee" wrote:

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?

--
Carlee



All times are GMT +1. The time now is 12:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com