Thread: if emthy
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tushar Mehta Tushar Mehta is offline
external usenet poster
 
Posts: 1,071
Default if emthy

Depending on what you mean by empty

on error resume next
set myrange2=nothing
Set myrange2 = _
Sheets(Range("kurt!$i$1").Value).Range(Range("kurt !$i$1").Value)
on error goto 0
if myrange2 is nothing then
'do stuff is nothing
end if

Or, you may want to look up VBA for the IsEmpty function.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
Hi!!

I have this in a userform
Set myrange2 =
Sheets(Range("kurt!$i$1").Value).Range(Range("kurt !$i$1").Value)

Can i do something if the range is emthy

regards alvin