TimvMechelen
Board Regular
- Joined
- Nov 7, 2016
- Messages
- 121
Hi all,
Can somebody tell me why this VBA code doesn't work:
When saving I want a msgbox that say "Saved"
When the saving failed I want a msgbox that says "Not Saved!"
Thanks for your help
Can somebody tell me why this VBA code doesn't work:
Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If SaveAsUI = True Then
MsgBox "Saved", vbOKOnly + vbInformation
ElseIf SaveAsUI = False Then
MsgBox "Not Saved!", vbOKOnly + vbCritical
End If
End Sub
When saving I want a msgbox that say "Saved"
When the saving failed I want a msgbox that says "Not Saved!"
Thanks for your help