Solved

How to validate multiple text in the TextBox control

Posted on 2011-03-11
4
340 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
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
4runnerfun earned 300 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 200 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

This article will show you how to use shortcut menus in the Access run-time environment.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

770 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