|
-
Oct 3rd, 2000, 03:18 PM
#1
Thread Starter
New Member
For those of you who log errors, here's a handy little way to find out what line number errored : Erl
Here's an example(this code is intentionally set up to error):
[code]
Private Sub Command1_Click()
1 On Error GoTo Hell
Dim x() As String
2 x(1) = "This is a test"
3 Exit Sub
Hell:
4 Debug.Print "Error- " & Err.Description & " at Line Number: " & Erl
End Sub
[\code]
If your lines aren't numbered, it'll return a 0. There's a cool little tool out there that will number all of your lines for you, called vbAdvantage. Just thought I'd share since there's nothing about it in the MSDN Library
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
|