View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default == How to test if a range var contains nothing

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