Bob,
This topic interests me, so I'll barge in. This does not seem to
work:
Sub RangeStatus2()
Dim z As Range
Set z = [a1:b5]
If IsEmpty(z.Value) Then
MsgBox "empty"
Else
MsgBox "not empty"
End If
End Sub
What did I do wrong?
James
Bob Phillips wrote:
> If rng.Value = "" Then
>
> or
>
> If IsEmpty(rng.Value) Then
>
> or
>
> If Len(rng.value) = 0 Then
>
> --
> HTH
>
> Bob Phillips
>
> (replace somewhere in email address with gmail if mailing direct)
>
> "SuitedAces" <SuitedAces.2a40b5_1151493324.046@excelforum-nospam.com> wrote
> in message news:SuitedAces.2a40b5_1151493324.046@excelforum-nospam.com...
> >
> > I have Dim a variable as a range.
> >
> > I am trying to write an IF statement based on that range being empty,
> > and having no success.
> >
> > Any help is appreciated.
> >
> >
> > --
> > SuitedAces
> > ------------------------------------------------------------------------
> > SuitedAces's Profile:
> http://www.excelforum.com/member.php...o&userid=35840
> > View this thread: http://www.excelforum.com/showthread...hreadid=556412
> >
Bookmarks