How to determine within a macro if a cell contains a hyperlink.

  • Thread starter Richard L. Miga
  • Start date
R

Richard L. Miga

I have created an excell worksheet which is a "pasting" of information off of
a web page that contains hyperlinks. I now want to use an excell macro to
determin which cells contain the pasted hyperlinks. Please note that the
"pasting" is created by selecting and then copying the part of the web page I
am looking at. As such, when I paste in excell it does maintain the
hyperlink, but when one looks at the cell contents that contains a hyperlink
it looks like text (i.e. there is no "=HYPERLINK ..." construct) yet is is
underlined and colored indicating that it is a hyperlink and when one click
on it it goes to the hyperlink. Thus, I am looking for a method to determine
if a cell contains a hyperlink via an excell macro. I am using Excell 2003.
 
J

JE McGimpsey

One way:

Dim bHasHyperlink
bHasHyperlink = Range("A1").Hyperlinks.Count > 0
 
R

Richard L. Miga

Thanks for the reply. Could you please provide a URL for the article so I can
better understand your reponse. I tried a search for the
"1CE3DA2B-5FA3-45C4-BBEC-C065EF47CC95" artilce on the MS Site, but it
returned nothing.
 
G

Gord Dibben

Richard

That "article" address is the URL to your original post and goes nowhere.

JE just posted code.......no article.


Gord Dibben MS Excel MVP
 
R

Richard L. Miga

Thanks for educating the ignorant.

Gord Dibben said:
Richard

That "article" address is the URL to your original post and goes nowhere.

JE just posted code.......no article.


Gord Dibben MS Excel MVP
 

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

Top