Hello !

Today I have a simple question.

I have a cell that I want to contain "C" or "NC". When I press my button control, I want a MsgBox to pop up if it's different.
I tried this :
Sub Macro1()
Dim strContent As String strContent = Range('sheet1!A1").Value If strContent <> ( "C" Or "NC") then
MsgBox "The content is incorrect.", vbOkOnly, "Error"
End If
End Sub
Of course, it doesn't work, or else I wouldn't be there

Is there a way to do it like so, or do I have to write strContent <> "C" and strContent <> "NC" ?

Thank you !