Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to check for empty text box 1

Status
Not open for further replies.

hondaman2003

Programmer
Mar 3, 2008
202
US
I need to use a select case to check for not only multiple values but one option is that the text box is blank.

Select case txtTextBox
case "value1", "value2", "value3", null
msgbox "worked"
case else
msgbox "did not work"
end select

How can I make this work?
 
Select Case Trim(txtTextBox & "")
case "value1", "value2", "value3", ""
...


Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I'm sorry, I didn't notice your 'trim' statement. Yes, this did work!

Thank you so much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top