View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
quartz quartz is offline
external usenet poster
 
Posts: 35
Default Trapping and preventing a form from being e-mailed before validation

Hello, I'm using VBA in Excel XP with Win 2000

I have developed a form with a variety of on-sheet controls. I also have an on-open event performing a variety of functions

Is there a way to prevent a user from e-mailing an open Excel file to someone else? Ideally it would function like the "Before_Save" event and would trap any method of attempting to e-mail the form (such as by shortcut key, menu, etc.).

The form really needs to be validated before e-mailing and that should be performed by clicking one of the control buttons on the sheet and not by short cut key nor by using the menu as such methods won't invoke my validation routine (which will only work if the entire form is completed)

If there is no sure fire trapping method, does anyone have a list of the methods my code should counter to prevent this from occurring? If this is the case, your example code on how to trap other methods would be very helpful. Thanks in advance for your assistance.