Re: VBA - checking for existance of a property
- From: B <mayyit@xxxxxxxxx>
- Date: Sat, 24 May 2008 09:03:32 -0700 (PDT)
On May 25, 1:40 am, "Bernie Deitrick" <deitbe @ consumer dot org>
wrote:
B,
Use the error to your advantage:
Sub Test()
Dim myT As String
On Error Resume Next
myT = "No Comment!"
myT = ActiveCell.Comment.Text
MsgBox IIf(myT = "", "Comment is blank", myT)
End Sub
"B" <may...@xxxxxxxxx> wrote in message
news:82e1626d-c79e-4557-9063-fb95930cc2ae@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi All,
I'm making a function that works with the Range.Comment object.
There's Comment.Text, but if there's nothing in it, it just errors
out.
How to check if .Text exists or not before attempting to read from it?
Thanks
Thanks
.
- References:
- Prev by Date: Re: accept fractions from textbox
- Next by Date: Re: accept fractions from textbox
- Previous by thread: VBA - checking for existance of a property
- Index(es):
Relevant Pages
|