Dim FH as Integer
FH = FreeFile
Open "whatever.txt" For Input As #FH
.
.
.
Close #FH
On Error Goto ErrorHandler1
' do stuff
On Error Goto 0
Open "blah.txt" For Input As ....
On Error Goto ErrorHandler2
' blah blah
On Error Goto 0
Close #FH
Exit Sub
ErrorHandler1:
MsgBox "Something nasty happened."
Resume Next
ErrorHandler2:
MsgBox "An error occurred while writing to the file..."
Close #FH