• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA code snippet | custom close excel file

Hi,

Can anyone help me with this as I have a requirement that suppose not to allow users to close the excel file unless they do the require validation activity completely.
I have somehow managed to include/capture the validation check and connected that to a call.

Now, depends upon the cell value, can we not allow user to close the file if the value is > 0?

Thanks in advance,
Karthik
 

Attachments

  • Custom close.xlsm
    9 KB · Views: 3

Hi !

Use event Workbook_BeforeClose (ThisWorkbook module)
and set its Cancel variable to True if condition fails
with a Beep or a MsgBox warning …
 
Back
Top