Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
I have a userform that contains text boxes and combo boxes and option buttons. Is there an easy way to determine if all the appropriate controls are filled in? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
for each ctrl in userform1.controls
if ctrl.Value = "" then msgbox "Not filled in" end if Next -- Regards, Tom Ogilvy "Julie" wrote in message ... Hi All, I have a userform that contains text boxes and combo boxes and option buttons. Is there an easy way to determine if all the appropriate controls are filled in? Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Julie,
The best way is to have an OK button that checks each control. You can either test them by name If Textbox1.Text < "" Then ... or in a loop For Each ctl In Me.Controls if ctl.Value = "" Then ... maybe do something End If Next ctl. but look upon it as an opportunity, you can test the values for validity at the same time. -- HTH RP (remove nothere from the email address if mailing direct) "Julie" wrote in message ... Hi All, I have a userform that contains text boxes and combo boxes and option buttons. Is there an easy way to determine if all the appropriate controls are filled in? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
one userform to another | Excel Discussion (Misc queries) | |||
Access from add_in userform to main template userform.... | Excel Programming | |||
Linking userform to userform in Excel 2003 | Excel Programming | |||
Userform | Excel Programming | |||
Userform inside another userform | Excel Programming |