Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to validate multiple text in the TextBox control

Posted on 2011-03-11
4
Medium Priority
?
346 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
Suggested Courses

618 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