ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need help with message box. (https://www.excelbanter.com/excel-programming/320912-need-help-message-box.html)

Pat

Need help with message box.
 
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



Norman Jones

Need help with message box.
 
Hi Pat,

Try:

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


---
Regards,
Norman



"Pat" wrote in message
...
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






All times are GMT +1. The time now is 05:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com