Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel gurus:
Users enter numerical data into input boxes in my UserForms in text form like $1,345,561.50 or as arithmetic expressions like $40,000*(1.03)^2.5, and to check that no extraneous characters have been inadvertently keyed in, I do the following: Sub MyTextBox_AfterUpdate If MyTextBox.Text Like "*[a-zA-Z`~!@#&_=:;|\<'?{}""]*" Then MsgBox "Sorry, you have entered an illegal character." End If End Sub Rather than doing it that way, is it possible to somehow use the Like operator in a complementary manner, in which the arguments enclosed in brackets are the symbols that are permitted; that is, [0-9$,.+-*/^()] -- Dennis Eisen |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Operator for Contains | Excel Worksheet Functions | |||
XOR Operator - How? | Excel Discussion (Misc queries) | |||
what does ~ operator mean? | Excel Discussion (Misc queries) | |||
OR Operator | Excel Worksheet Functions | |||
Can the AND operator be of use here? | Excel Programming |