![]() |
|
#4
|
||||
|
||||
|
You've already got End sprinkled throughout that code (yuk) that does what you need, so you could simply use that again. IMO there are very few situations where that is really the best option. I'd move the validation code into a separate function that returns True if the save happens and false otherwise, then you can call that from anywhere you need it rather than having to make events public just so that you can call their code directly rather than leaving them to respond to events as they are designed.
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Standard Module, Class Module and UserForm | jpl | Word VBA | 0 | 03-14-2022 07:20 AM |
VBA code not in module of new document produced by mail merge
|
MP1989 | Mail Merge | 3 | 09-10-2018 02:16 PM |
pause VBA code to view PDF file then continue or cancel
|
trevorc | Excel Programming | 3 | 06-17-2018 09:46 AM |
Inserting code line in Word Module
|
mihnea96 | Excel Programming | 2 | 08-15-2017 04:57 AM |
Stop macro if no file is selected in dialog box (when user presses cancel instead of selecting file)
|
spencerw.smith | Word VBA | 2 | 08-12-2014 07:56 AM |