Prompt to save changes
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim ans As Long
ans = MsgBox("Save changes (Y/N)?",vbYesNo)
If ans = vbYes Then
HideSheets
DeleteCM
End If
End Sub
--
HTH
Bob Phillips
"sanj" wrote in message
...
Hi,
I tried to search for this answer, I have a routine that executes on
Private Sub Workbook_BeforeClose(Cancel As Boolean)
HideSheets
DeleteCM
End Sub
but before the Hidesheets and DeleteCM execute I would like to prompt the
user if they would like to save the changes, only if the select 'Yes'
should
the Hidesheets and DeleteCM execute - any help is appreciated.
Regards.
Sanjay
|