Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
So I have a UserForm asking for a couple of different values. These
values should all be numbers. I already added so that the program doesn't continue if the Textbox value is "" (blank). How do I make it not continue if the Textbox value is not a number, i.e. text only, or text and a number? I've tried the following two ideas: XVariance = UserForm1.TextBoxXVariance.Text 1. If Val(XVariance)/1 = Val(XVariance) then ...... else exit sub end if 2. Const TextCharacters = "abcdefghijklmnopqrstuvwxyz" and If InStr(XVariance, TextCharacters) Then Exit Sub I just want to make sure the Textbox contains a number using only 0123456789 and a decimal point. Seems pretty simple and straightforward, but I'm stuck. Thankx, NP |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Assigning Row Number to TextBox | Excel Discussion (Misc queries) | |||
how to format text in textbox? | Excel Discussion (Misc queries) | |||
Textbox text visibility | Excel Discussion (Misc queries) | |||
Verify information and input a value | Excel Discussion (Misc queries) | |||
Userform textbox number formats | Excel Discussion (Misc queries) |