Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to thank Melanie Breden and Doug Glancy for their suggestions regarding
the Like operator. After much research I finally stumbled upon what to do. The solution is in inserting the ! character right after the opening bracket. The ! character immediately to the right of the opening bracket acts like a NOT operator. Thus, Sub MyTextBox_AfterUpdate If MyTextBox.Text Like "*[!0-9$,.+-*/^()]*" MsgBox "Sorry, you have entered and illegal character." End If End Sub This will accept entries like $12,345.67 or $52.27*(1.03)^2.5 and will reject entries containing an alphabetic characters or extraneous symbols such as @ # { } [ ] \ ~ ` | \ < Once again, thanks all. -- 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 |