View Single Post
  #20   Report Post  
Posted to microsoft.public.excel.programming
GS[_6_] GS[_6_] is offline
external usenet poster
 
Posts: 1,182
Default Using the red X (Upper right hand corner) for another purpose.

Too much missing code but here's your Exit_Referrals routine revised...

Option Explicit

Public bMacroRun As Boolean


Sub Exit_Referrals()
Const sMsg$ = "Would you like to Exit the Referral Workbook?"
Const sTitle$ = "Vocational Services Database - " _
& Sheets("TOC").Name
If MsgBox(sMsg, vbYesNo, sTitle) = vbYes Then
bMacroRun = True
With ThisWorkbook
Sheets("TOC").Calculate: .Save
End With 'ThisWorkbook
Application.Quit
End If 'bMacroRun
End Sub

If you make a copy of the workbook with some (perhaps unnecessary) pages
removed I can download and take a look...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion