sassriverrat
Well-known Member
- Joined
- Oct 4, 2018
- Messages
- 655
I have this piece of error coding I've written. Userform18, when called upon, gives some info on how to further handle the error. Because I have hundreds of pieces of "error coding" (each one of them is idential but has a different ### assigned in the "with error codes [xxx]" piece, is it possible to get that error code to show up in userform18 or not because userform18 is a whole different part of the workbook? My idea here is to have a cmd button in userform18 that a person will click and it will auto email (with a pre-specified email and such) the error codes.... and hopefully a screenshot.
I'd also LOVE to have a piece of coding for Userform18 (another CMD button) that would take a screenshot of the coding that error'd for me to work with. Thanks!
I'd also LOVE to have a piece of coding for Userform18 (another CMD button) that would take a screenshot of the coding that error'd for me to work with. Thanks!
Code:
'Error Clearing CodeExit Sub
Helper:
resp = MsgBox("We're sorry to see you've encountered an error." & vbCrLf & vbCrLf & "To proceed, we recommend you contact the Developer " & _
"with error codes [1057] and " & "[" & Err.Number & "-" & Err.Description & "]." & vbCrLf & vbCrLf & "To attempt to patch your problem at least " & _
"temporarily, we recommend you click [Yes] to see help directions. Would you like to continue?", vbYesNoCancel, name)
If resp = vbYes Then
UserForm18.Show
'MsgBox ("Success")
ElseIf resp = vbNo Then
Exit Sub
ElseIf resp = vbCancel Then
Exit Sub
End If
End Sub