Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Anthony:
'This is also a way to test the input. '/// Place the following on the Sheet Private Sub CommandButton1_Click() With UserForm1 .Show .TextBox1.SelStart = 0 .TextBox1.SelLength = Len(.TextBox1.Text) .TextBox1.SetFocus End With End Sub '/// This is on the Userform Private Sub CommandButton1_Click() If IsNumeric(TextBox1.Text) Then TextBox1.Text = TextBox1.Text MsgBox "Your Number is " & TextBox1.Text, , _ "Good Luck TK" UserForm1.Hide Else MsgBox "Please enter a valid Number " With TextBox1 .SelStart = 0 .SelLength = Len(.Text) .SetFocus End With End If Exit Sub End Sub 'Good Luck TK |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
help with inputting code | New Users to Excel | |||
Having trouble inputting numbers past 09 it shows 0.10 in excel | Excel Discussion (Misc queries) | |||
Inputting numbers using a macro. | Excel Discussion (Misc queries) | |||
inputting data | Excel Discussion (Misc queries) | |||
Auto fill text boxes in user form by inputting data in another | Excel Programming |