G
Guest
This Macro excerpt is based on a "Check Cell Content before continuing..."
discussion with Bill Renaud back in October.
I works great (thanks Bill) with one exception.
If the cells are changed in reverse order of my "Or" statements (Conditions
3, & 2 are met first) then the Macro continues even though the 1st condition
has not been met.
Every other combination works.
Thanks in advance for any help on this. (Code Below)
'/// Check for Required Fields (Project Number)
If Range("Q44").Value = "Fill in..." Or _
Range("F47").Value = Range("AB2").Value Or _
Range("H56").Value = Range("AH2").Value _
Then
MsgBox "Please fill in the Abbreviation, Project Type, Class, and
Application Date fields (blue font with an *)", _
vbCritical + vbOKOnly, _
"You have not filled in all the fields required to generate a
complete project number."
Exit Sub
Else
'Do macro.
End If
discussion with Bill Renaud back in October.
I works great (thanks Bill) with one exception.
If the cells are changed in reverse order of my "Or" statements (Conditions
3, & 2 are met first) then the Macro continues even though the 1st condition
has not been met.
Every other combination works.
Thanks in advance for any help on this. (Code Below)
'/// Check for Required Fields (Project Number)
If Range("Q44").Value = "Fill in..." Or _
Range("F47").Value = Range("AB2").Value Or _
Range("H56").Value = Range("AH2").Value _
Then
MsgBox "Please fill in the Abbreviation, Project Type, Class, and
Application Date fields (blue font with an *)", _
vbCritical + vbOKOnly, _
"You have not filled in all the fields required to generate a
complete project number."
Exit Sub
Else
'Do macro.
End If