C
Corey
I have a Workbook that has a great many Procedures and Userforms c/w code.
I use a Clip Art 'EXIT' sign as a way to Save/Close the workbook with simple Code.
But about 50% of the Time the Code Saves then Closes, and Crashes, giving me a 'Do you want to Send Report' Option.
The other 50% of the time there is No issues.
The code to Close when clicking the Clip Art Image is:
~~~~~~~~~~~~~
Sub Picture6_Click()
Application.DisplayAlerts = False
ActiveWorkbook.Save
If Workbooks.Count > 1 Then
ActiveWorkbook.Close
Else
Application.Quit
End If
Application.DisplayAlerts = True
End Sub
~~~~~~~~~~~~~
My question is, I think the problems IS NOT the above code, but nothing else executes on exit, so how can I Debug the workbook to fit the problem ?
I use a Clip Art 'EXIT' sign as a way to Save/Close the workbook with simple Code.
But about 50% of the Time the Code Saves then Closes, and Crashes, giving me a 'Do you want to Send Report' Option.
The other 50% of the time there is No issues.
The code to Close when clicking the Clip Art Image is:
~~~~~~~~~~~~~
Sub Picture6_Click()
Application.DisplayAlerts = False
ActiveWorkbook.Save
If Workbooks.Count > 1 Then
ActiveWorkbook.Close
Else
Application.Quit
End If
Application.DisplayAlerts = True
End Sub
~~~~~~~~~~~~~
My question is, I think the problems IS NOT the above code, but nothing else executes on exit, so how can I Debug the workbook to fit the problem ?