Look at this code:
On first execution of DO LOOP error handler traps err.number 53 (File ton found)- That OK!Code:On Error GoTo err_han Dim DataFile as Field Do Until recordset1.EOF strPath = DataFile Open strPath For Input As #1 lab1: recordset1.MoveNext Loop Exit Sub err_han: Select Case Err.Number Case Is = 53 Label2.Caption = "No file to open" DoEvents GoTo lab1 Case Else MsgBox Err.Number & " - " & Err.Description & " - " & Err.Source End Select
On next execution (second step) error handler does not work and I get Run time error '53'. File not found!
Is this weird or what?




Look at this code:
Reply With Quote