LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA - using Goto - Please Help!

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
? IF & GOTO ? Karen D Excel Worksheet Functions 17 September 2nd 09 10:58 PM
? IF and GOTO ? Karen D Excel Worksheet Functions 2 September 1st 09 07:57 PM
Goto Tab Ed Davis Excel Discussion (Misc queries) 3 September 4th 08 10:35 PM
If.....Then GoTo....... Alec H Excel Discussion (Misc queries) 4 February 22nd 06 02:42 PM
Goto next used row JonWayn Excel Programming 0 November 20th 03 03:00 AM


All times are GMT +1. The time now is 09:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"