excel - How to use Workbook_BeforeClose from a custom module -
i trying prompt user when tries close workbook this
private sub workbook_beforeclose(cancel boolean) msgbox "changes has been detected. want export data ?" end sub
i know code need placed in thisworkbook module. there way custom module ? need add functionality multiple workbooks used client part of up-gradation, done replacing old modules new modules.
you can use application.vbe object , workbook.vbproject modify file's vba. note requires excel performing upgrade has have setting "trust access vba project" toggled on (it can found in trust center under tab macro settings). when not needed anymore, it's option best left off though security reasons.
Comments
Post a Comment