Underlying Hyperlinks in Excel Using VBA

T

Tam

I want to get the hyperlink from an Excel Sheet. My Excel Sheet has 100 rows
and the column N has the hyperlinks.. I am trying to extract all the
hyperlink in a loop .. using the following method...

RowCounter = 2
While RowCounter <= Row Count
Ranges = "N"&RowCounter
Address = xlWorkSheet.Range(Ranges).Hyperlinks(1).Address
Wend

But this returns me an erro rsubscript out of Range..

If I use this formula on Cell A1 it works.. if I use it on anyother Cells
like N2, N3 or any other combination it throws the error.

Is there any other change I need to do in the Method to get it to work.
 

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