null value cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,

I’m attempting to create code to evaluating cell content. However, I am
having a little trouble creating code to recognize cells having no value or
null cell. Here’s the code.

Sub testcode()
Sheets("DISPLAY").Select
If Range("O9").Value <> Null Then
If Range("O9").Value <> "FirstBoxDisputesRelated" Then
DropDownBox = Range("O9").Text
ActiveSheet.Shapes(DropDownBox).Select
Selection.Cut
End If
End If
End Sub

What changes are required to recognize cell O9 when the value does not equal
null?

Thanks
Paul
 
Instead of testing for Null, test for an empty string. E.g.,

If Range("O9").Value <> "" Then


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 

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

Back
Top