|
-
Sep 24th, 2001, 06:01 AM
#1
Run-time Error 5 ????
Hi Guys,
I have the folowing code with what I thought had Error handling built in? However during testing, when I compile and run the app, a run-time error 5 apperars (followed by MY error msgbox) if a value grater than an 'integer' ie 555555, is entered in a filed.
I thought I was handling any Error.
My question is why does the system generate an error dialog, if I was handling it ??(obviously I wasn't doing a good enough job ).
Private Sub txtClimb_Min_LostFocus()
On Error GoTo Input_Error
varClimb_Min = txtClimb_Min.Text
varRoundUp = varClimb_Min
Call RoundUp(varRoundUp)
txtClimb_Lit = varRoundUp
Exit Sub
Input_Error:
MsgBox "Please enter a valid number", vbOKOnly + vbCritical
txtClimb_Min.SelStart = 0
txtClimb_Min.SelLength = Len(txtClimb_Min.Text)
txtClimb_Min.SetFocus
End Sub
PS. 1. The Function (Call RoundUp(varRoundUp)) has the same type error handling.
2. It ONLY happens to the compiled app, I can't trip it up running under VB?
Cheers,
Bruce (I'm still learning ).
________
Angelique
Last edited by Bruce Fox; Aug 14th, 2011 at 03:51 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|