sassriverrat
Well-known Member
- Joined
- Oct 4, 2018
- Messages
- 655
I have two workbooks identically named- one is the master and one a working copy. If I open both, the second one opening kicks an 9- out of script error. What causes this?
Code:
Function PrevSheet(RCell As Range)
'Begins Error Handling Code
On Error GoTo Helper
Dim xIndex As Long
Application.Volatile
xIndex = RCell.Worksheet.Index
If xIndex > 1 Then
PrevSheet = Worksheets(xIndex - 1).Range(RCell.Address)
End If
'Error Clearing Code
Exit Function
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 [1141] 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 Function
ElseIf resp = vbCancel Then
Exit Function
End If
End Function