M
mark_hall
Hi,
I currently have this macro to check whether certain cells are
populated before allow the document to be emailed.
Private Sub email123()
' email123 Macro
Dim Cell As Range
For Each Cell In Range("mandatory_fields")
If Cell.Value = "" Then
MsgBox "Please complete all mandatory fields."
Exit For
Else
MsgBox "All mandatory fields have been completed. Will now send
template."
ActiveWorkbook.SendMail Recipients:="intended email address",
Subject:="RFC : " & Range("b9")
End
End If
Next
End Sub
However, my range (mandatory_fields) can only cover a certain number of
fields (6 i think) and when validating, if the first cell in the range
is populated - validation is accepted, even though the other cells in
the range are not.
Does this make sense and if so where am I going wrong.
I currently have this macro to check whether certain cells are
populated before allow the document to be emailed.
Private Sub email123()
' email123 Macro
Dim Cell As Range
For Each Cell In Range("mandatory_fields")
If Cell.Value = "" Then
MsgBox "Please complete all mandatory fields."
Exit For
Else
MsgBox "All mandatory fields have been completed. Will now send
template."
ActiveWorkbook.SendMail Recipients:="intended email address",
Subject:="RFC : " & Range("b9")
End
End If
Next
End Sub
However, my range (mandatory_fields) can only cover a certain number of
fields (6 i think) and when validating, if the first cell in the range
is populated - validation is accepted, even though the other cells in
the range are not.
Does this make sense and if so where am I going wrong.