Workbook Event BeforeSave to Prompts the User for his Response to really Save the Workbook or Not.
The following example prompts the user for a YES or NO response before saving any workbook.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)Alert = MsgBox("Press Yes to Save the Workbook", vbYesNo, "Do You Really Wants to Save ?")
If Alert = vbNo Then Cancel = True
End Sub
Before Save Event Image View :
Prompt for the User :
Each time when you press "Ctrl+S" , the Event will occur and Prompt the Msgbox for User Response as below:
Thanks, TAMATAM
No comments:
Post a Comment
Hi User, Thank You for visiting My Blog. Please post your genuine Feedback or comments only related to this Blog Posts. Please do not post any Spam comments or Advertising kind of comments which will be Ignored.