?
Solved

How to validate multiple text in the TextBox control

Posted on 2011-03-11
4
Medium Priority
?
344 Views
Last Modified: 2012-06-21
Hi I need help with validation of multiple control words in the TextBox.
I have this simple code, which validates the user into the TextBox wrote:

If Slide5.TextBox4.Value = "Prague" Then
Slide5.TextBox4.BackColor = &HC0FFC0
Else:
Slide5.TextBox4.BackColor = &HC0C0FF
End If


I want the textbox the words "Prague" also recognized and inserted the word "Prag", ie. If the user writes, "Prague" or "Prag", then change the color: .BackColor = &HC0FFC0
Thanks in advance for your help.
TM
0
Comment
Question by:Thomas_Meyer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
4runnerfun earned 1200 total points
ID: 35111148
As in... ?
If Slide5.TextBox4.Value = "Prague" OR Slide5.TextBox4.Value = "Prag" Then
Slide5.TextBox4.BackColor = &HC0FFC0
Else:
Slide5.TextBox4.BackColor = &HC0C0FF
End If
0
 
LVL 59

Assisted Solution

by:Chris Bottomley
Chris Bottomley earned 800 total points
ID: 35111155
If Slide5.TextBox4.Value = "Prague" or Slide5.TextBox4.Value = "Prag"Then
Slide5.TextBox4.BackColor = &HC0FFC0
Else:
Slide5.TextBox4.BackColor = &HC0C0FF
End If
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 35111162
Snap ... ish!

Chris
0
 

Author Closing Comment

by:Thomas_Meyer
ID: 35111217
Thanks, it was so easy!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a serious pitfall that can happen when deleting shapes using VBA.
New style of hardware planning for Microsoft Exchange server.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question