Hi,
Since Excel does not have a before forward command the best you could do
with any ease would be to use Before Save. I suppose you could write a
program that disabled the File Menu's Send command until the appropriate
cells had been filled in, but that doesn't mean that the user would be
forwarding the file from inside of Excel.
Here is sample code for a before save event:
Here is an example of a Before Save event which hides some rows and columns
and protects the spreadsheet with a password:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim cell As Range
On Error Resume Next
For Each cell In Range("Required")
If cell = "" Then
MsgBox "You haven't completed the required entries."
Cancel = True
Exit Sub
End If
Next cell
End Sub
You will also need to select the cells requiring entry and name them Required.
1. To add this code to your file, press Alt+F11,
2. In the VBAProject window, top left side, find your sheet name under your
file name and double click it.
3. Paste in or type the code above.