Need help with message box.

P

Pat

I want to modify the following code:

If Not IsEmpty(Cells(22, 11)) Then
MsgBox "Old code"
Exit Sub
End If

to this:

If Not IsEmpty(Cells(22, 11) = "QS") Then
MsgBox "New code"
Exit Sub
End If

It has not worked, what should it be.
Appreciate your help.
Pat
 
N

Norman Jones

Hi Pat,

Try:

If Cells(1, 1).Value = "QS" Then
MsgBox "New code"
Exit Sub
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top