LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Checking a complex userform for blank entries

I have a complex userform that I would like to be checked for blank entries
upon posting. The following code does great as long as I am just looking at
Textboxes or just one kind of control.

Dim ctl

For Each ctl In Me.Controls
If TypeName(ctl) = "TextBox" Then
If ctl.Text = "" Then
MsgBox "Missing answer, please complete"
ctl.SetFocus
Exit For
End If
End If
Next ctl

However, my user form has several comboboxes and several groups of
OptionButtons (Yes, No, NA) that I would like checked also. Is there any way
to check everything on the page at once?

WillRn
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking For Duplicate Entries in a Userform robinsn Excel Discussion (Misc queries) 0 August 19th 10 01:28 PM
Checking Column Entries gtb Excel Worksheet Functions 9 November 3rd 08 06:10 AM
Checking entries against a column of data TonyR Excel Discussion (Misc queries) 1 May 31st 07 07:21 PM
Checking for double entries The Fool on the Hill Excel Discussion (Misc queries) 6 November 16th 06 12:07 PM
Checking for duplicate entries Daniel- Sydney Excel Discussion (Misc queries) 3 November 7th 06 09:16 AM


All times are GMT +1. The time now is 05:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"