if emthy

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

Guest

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
 
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
 

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

Similar Threads


Back
Top