|
-
Nov 25th, 1999, 10:26 PM
#1
Thread Starter
Hyperactive Member
-
Nov 25th, 1999, 10:52 PM
#2
Hyperactive Member
Code:
ErrorHandling:
if err.number = 53 then
msgbox "No File, No Fun..."
resume next
end if
[This message has been edited by Inhumanoid (edited 11-26-1999).]
[This message has been edited by Inhumanoid (edited 11-26-1999).]
-
Nov 28th, 1999, 03:59 PM
#3
Thread Starter
Hyperactive Member
-
Nov 28th, 1999, 04:21 PM
#4
Hyperactive Member
I just ran this on my machine:
Code:
Private Sub Form_Load()
Call ReadFromFile
End Sub
Private Sub ReadFromFile()
Dim strTemp As String
Dim strX As String
On Error GoTo ErrorHandling
Open App.Path & "\Recent.txt" For Input As #1
Do While strTemp <> "[END]"
Line Input #1, strTemp
If strTemp <> "[END]" Then cboSentMessages.AddItem strTemp
Loop
Close #1
Exit Sub
ErrorHandling:
If Err.Number = 53 Then
MsgBox "No File, No Fun..."
Resume Next
End If
End Sub
It worked fine (also when I compiled it)...
Goto Tools-options (in the menubar).. Go to tabstrip general. Take a look at the frame "Error trapping" and make sure it is NOT set on "Break on all errors"...
It should work, now...
B.T.W. If you get the code to work now (without vb giving you some run-time error crap), it might be an idea to put code that generates the file in the errorhandler
[This message has been edited by Inhumanoid (edited 11-29-1999).]
-
Nov 28th, 1999, 04:52 PM
#5
Thread Starter
Hyperactive Member
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
|