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 :
Of course, it doesn't work, or else I wouldn't be there![]()
Sub Macro1()
Dim strContent As String strContent = Range('sheet1!A1").Value If strContent <> ( "C" Or "NC") thenEnd SubMsgBox "The content is incorrect.", vbOkOnly, "Error"End If
Is there a way to do it like so, or do I have to write strContent <> "C" and strContent <> "NC" ?
Thank you !
Bookmarks