It happens that Greg Lovern formulated :
Hi Don,
The user could certainly get around the restriction if they wanted to.
The idea is to prevent them from emailing it before they've finished
filling it out. I can check the fields -- I'm already doing that
before they save the workbook -- but if checking shows that one of the
required fields is not filled out, I want to prevent them from
emailing it until they fill out all the required fields. If they
decide to go through some extra steps to get around the limitation,
that's fine -- in that scenario, they will have been warned and will
be aware of what the business consequences are of sending it out
incomplete.
Greg
This would require 'hooking' all menus that send email to use your
procedure BEFORE allowing the built-in process to continue. You could
abort the email at this point, notifying the user that required fields
are incomplete.
As Don suggests, though, this won't stop users from going around your
efforts.
I recommend using a control variable (to set the state of the fields)
that you can check to determine if requirements are met. This could be
something as simple as a public boolean (ie: gbAllowEmail) that you set
according to the same criteria you use for saving the file.
You can 'hook' the built-in menus by reassigning their 'OnAction'
property at startup (wkb.Open). Be careful, though, to 'Reset' these
menus at shutdown (wkb.Close)!