#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 209
Default if emthy

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 209
Default if emthy

Have done it again

Alvin


"Alvin Hansen" skrev:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 209
Default if emthy

Thanks for the help

Alvin


"Tushar Mehta" skrev:

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"