GMan
03-20-2009, 08:41 AM
I want to add a hyperlink to the column A of my workbook that links to the folder related to the request. My issue is that I know only 99% of the directory path for the Hyperlink.
For example:
Cell A2 would have the value of "FM1849" and would link to "C:\CSR Work\CC18xx\CC1849 - Update Report"
Cell A3 would have the value of "FM1850" and would link to "C:\CSR Work\CC18xx\CC1850 - Change Application Processing"
Currently I have coded:
iRow = 2
Do While AllCSRs.Cells(iRow, 1) > ""
With AllCSRs
.Hyperlinks.Add anchor:=Range("A" & iRow), _
Address:="C:\CSR Work\" & _
Left(AllCSRs.Cells(iRow, 1), 4) & _
"xx\" & AllCSRs.Cells(iRow, 1) & _
" - Update Report"
End With
iRow = iRow + 1
Loop
My code would work for the A2 cell but will have the incorrect description for the A3 cell. Is there a way that I can make the " - Update Report" dynamic and pull the information form the folder tree itself?
The end result should be a hyperlink that when clicked will open up the folder that has all the documents related to change request work.
For example:
Cell A2 would have the value of "FM1849" and would link to "C:\CSR Work\CC18xx\CC1849 - Update Report"
Cell A3 would have the value of "FM1850" and would link to "C:\CSR Work\CC18xx\CC1850 - Change Application Processing"
Currently I have coded:
iRow = 2
Do While AllCSRs.Cells(iRow, 1) > ""
With AllCSRs
.Hyperlinks.Add anchor:=Range("A" & iRow), _
Address:="C:\CSR Work\" & _
Left(AllCSRs.Cells(iRow, 1), 4) & _
"xx\" & AllCSRs.Cells(iRow, 1) & _
" - Update Report"
End With
iRow = iRow + 1
Loop
My code would work for the A2 cell but will have the incorrect description for the A3 cell. Is there a way that I can make the " - Update Report" dynamic and pull the information form the folder tree itself?
The end result should be a hyperlink that when clicked will open up the folder that has all the documents related to change request work.