Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

check if there is hyperlink in a cell

1 view
Skip to first unread message

Shaul Bel

unread,
Dec 20, 2001, 6:27:58 PM12/20/01
to
I am looking for a macro that will find if there is a hyperlink in a cell.

Any idea?

Shaul Bel


Dave Peterson

unread,
Dec 20, 2001, 6:45:52 PM12/20/01
to
How about something like:

Function HasHyperlink(rng As Range) As Boolean

On Error Resume Next
HasHyperlink = (Len(rng(1).Hyperlinks(1).Address) <> 0)

End Function

tested with:

Sub testme()

MsgBox HasHyperlink(ActiveCell)

End Sub

--

Dave Peterson
ec3...@msn.com

Dick Kusleika

unread,
Dec 20, 2001, 6:48:21 PM12/20/01
to
Shaul

If Range("a1").Hyperlinks.Count > 0 Then

HTH
Dick K.

Shaul Bel <shau...@netvision.net.il> wrote in message
news:ONHce5aiBHA.2428@tkmsftngp03...

Shaul Bel

unread,
Dec 23, 2001, 3:19:17 PM12/23/01
to
Thank you.
This is what I was looking for.

Shaul Bel

"Dick Kusleika" <di...@paragonconstructioninc.com> wrote in message
news:#Mob0DbiBHA.2572@tkmsftngp04...

0 new messages