Hi All, I am using the following code, but unfortunately it is not giving the result I want:
What's going on is that if Replaced is set to "None", "Other" or "Laser Cavity", the module "Z8_PartsRep" module is called. It does not go to the ElseIf condition, which is what I expect it to do.
How did I get the logic wrong?
Code:
Dim model As String, Purpose As String, Replaced As String
model = Sheets("General Data").Range("B9").Value
Purpose = Sheets("General Data").Range("D5").Value
Replaced = Sheets("General Data").Range("D6").Value
If model = "Z8" And (Purpose = "Basic Service" Or Purpose = "Full Service") _
And (Replaced <> "Other" Or Replaced <> "None" Or Replaced <> "Laser Cavity") Then
Z8_PartsRep
GoTo 1
ElseIf (etc. etc. etc.)
End If
How did I get the logic wrong?