View Single Post
  #8   Report Post  
FrancisM FrancisM is offline
Junior Member
 
Posts: 14
Default Using the red X (Upper right hand corner) for another purpose.

Thank You. I will provide a sample later today. I do have an update. Yesterday, when I clicked on the x, it would not close both the workbook & the application, Now it does. Ideally, when the x is clicked it takes the user to the exit button but does not close. Also when the exit button is clicked the message pops up twice. Here is a copy of the current "Exit_Referrals" code:

Option Explicit

Sub Exit_Referrals()
Dim MsgBoxResult As String
If MsgBox("Would you like to Exit the Referral Workbook?" & vbCr, vbYesNo, "Voc. Rehab. - Referral") = vbNo Then
Exit Sub
Else
Sheets("TOC").Select
Application.Calculation = xlCalculationAutomatic
ThisWorkbook.Save
Application.Quit
End If

End Sub