Hello
I have a piece of codes that I wanted it to be run before saving. However, I do not know how to call the method that contains the validation codes in the BeforeSave event handler. I am super bad at coding macro, please help me.
Attached below is the sample file that I did to show what am I doing. The codes are inside the sample file.
Sample2.xlsm
I thought of using a function method so that I could have a return value to indicate whether to allow save or cancel saving. However, I am stuck as I do not know how to call the method in a way that I could check if the method returns a False, I will allow save. Else, if the method returns a True, I will cancel saving.
Please help me.![]()
Bookmarks