G
Guest
i want a pre-save program to check if there is a value in cell a1 before
someone saves. if there is, and user clicks 'No' then it will cancel saving.
thank you
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If Range("a1") = 1 Then aaa = MsgBox("Are you Sure?", vbCritical + vbYesNo,
"Dont want to Ruin Template!")
If aaa = vbNo Then ...
end sub
someone saves. if there is, and user clicks 'No' then it will cancel saving.
thank you
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If Range("a1") = 1 Then aaa = MsgBox("Are you Sure?", vbCritical + vbYesNo,
"Dont want to Ruin Template!")
If aaa = vbNo Then ...
end sub