View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_3_] Jim Thomlinson[_3_] is offline
external usenet poster
 
Posts: 983
Default == How to test if a range var contains nothing

if R is Nothing

not

if R = Nothing


"Frank Kabel" wrote:

Hi
one way:
If application.count(r)=0 then
'nothing
end if

--
Regards
Frank Kabel
Frankfurt, Germany


hcova wrote:
I need to check if a certain range var is nothing.
Suppose you have the following code

Dim R As Range

If R = Nothing then
End If

When I try to compile this I receive and object error in the If line.
Then how can I test if R has something. Finally IsNull and IsEmpty
donĀ“t work too. Regards