can I cancel a save
Yes and No
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Cancel = True
End Sub
Setting cancel to true will prevent the workbook from saving
use it with caution
Or try something like this
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
If MsgBox("Do you really want to save?", vbYesNo) = vbNo Then
Cancel = True
End Sub
George
|