Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I need to check data, and if it is wrong, go back to the text box, an inpt data again. I am trying something like this: In comand button ok: If (PercentTB.Value < 0) Or (PercentTB.Value 100) Then PercentTB = "" MsgBox "Value must be between 0.00% - 100.0%" GoSub PercentTB End If Where PercentTB have this sub: Private Sub PercentTB_KeyPress(ByVal KeyAscii A MSForms.ReturnInteger) If ((KeyAscii < Asc("0")) Or (KeyAscii Asc("9"))) Then KeyAscii = 0 End If End Sub and I get ERROR, Label not defined in line "GoSub PercentTB" I also need text box "PercentTB" looking like XX.X% Thanks -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
? IF & GOTO ? | Excel Worksheet Functions | |||
? IF and GOTO ? | Excel Worksheet Functions | |||
Goto Tab | Excel Discussion (Misc queries) | |||
If.....Then GoTo....... | Excel Discussion (Misc queries) | |||
Goto next used row | Excel Programming |