Hyperlinking cells

P

Paul

Hi,

I have this macro so far (which works)...

nrow = 6
ncol = 1

With Worksheets("Sheet1")

For rwindex = nrow To 22

fname = CStr(Cells(rwindex, ncol).Value)

ActiveSheet.Hyperlinks.Add Anchor:=Cells(rwindex, ncol), Address:= _
"Documents\" + fname + ".pdf"

nrow = nrow + 1

Next rwindex

End With

End Sub


I have a list of files starting in column 1, row 6 and this macro will
search the contents of this cell and input a hyperlink with the cell contents
(with the folder structure implemented) So my hyperlink will show this -
Documents/blababal.pdf Which is what i want, however, I cannot get this to
then start looking through other cells in the worksheet and returning the
value shown above. As i have file lists all over the worksheet. Also i will
need it to not return anything if the cell is blank or has no filename. I
understand this could be difficult (i maybe wrong, but i am new to VBA)

Any help is much appreciated
 

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