View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Can't test Range for Nothing

Don't use IsNull. Instead, use Is Nothing.

Dim rRange As Range
Set rRange = Nothing ' yes, in debugger
If rRange Is Nothing Then
MsgBox "rRange is Nothing"
End If



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

"Peter Chatterton" wrote in message
...
Public Sub testNullRange
Dim rRange As Range
Set rRange = Nothing ' yes, in debugger
If IsNull( rRange ) Then _
MsgBox "DOESN'T COME HERE"
End Sub