Using Resume Conditionally Based on User Feedback
Function GoodResume()
On Error GoTo GoodResume_Err
Dim strFile As String
strFile = Dir(strFileName)
If strFile = "" Then
GoodResume = False
Else
GoodResume = True
End If
Exit Function
GoodResume_Err:
Dim intAnswer As Integer
intAnswer = MsgBox(Error & ", Would You Like to Try Again?", vbYesNo)
If intAnswer = vbYes Then
Resume
Else
Exit Function
End If
End Function
Related examples in the same category