I need help Converting A list of File Paths in Excel to HyperLinks Using VBA

  • I am trying to debug this VBA Code to convert a list of about 300 or more File locations to HyperLinks using VBA. The attached code works, but either converts every other Row of Half the Rows in the list. It has to do with how I am using the StartCell and StartCell.Offset, but I cannot figure it out. And I cannot fine any VBA code without StartCell function.


    The Row of Cell Values are like the list, below... Any help would be appreciated... Thanks


    C:\Users\Owner\Documents\Documents\PITCO\Wells Fargo\ChkImages2\WFB 04 02 20_page_03.jpg
    C:\Users\Owner\Documents\Documents\PITCO\Wells Fargo\ChkImages2\WFB 03 30 20_page_34.jpg
    C:\Users\Owner\Documents\Documents\PITCO\Wells Fargo\ChkImages2\WFB 03 30 20_page_42.jpg
    C:\Users\Owner\Documents\Documents\PITCO\Wells Fargo\ChkImages2\WFB 03 30 20_page_50.jpg
    C:\Users\Owner\Documents\Documents\PITCO\Wells Fargo\ChkImages2\WFB 03 31 20_page_08.jpg
    C:\Users\Owner\Documents\Documents\PITCO\Wells Fargo\ChkImages2\WFB 03 31 20_page_16.jpg
    C:\Users\Owner\Documents\Documents\PITCO\Wells Fargo\ChkImages2\WFB 03 31 20_page_24.jpg
    C:\Users\Owner\Documents\Documents\PITCO\Wells Fargo\ChkImages2\WFB 03 31 20_page_32.jpg
    C:\Users\Owner\Documents\Documents\PITCO\Wells Fargo\ChkImages2\WFB 03 31 20_page_40.jpg
    C:\Users\Owner\Documents\Documents\PITCO\Wells Fargo\ChkImages2\WFB 03 31 20_page_48.jpg
    C:\Users\Owner\Documents\Documents\PITCO\Wells Fargo\ChkImages2\WFB 04 01 20 through 04 02 20_page_06.jpg
    C:\Users\Owner\Documents\Documents\PITCO\Wells Fargo\ChkImages2\WFB 04 01 20 through 04 02 20_page_14.jpg
    C:\Users\Owner\Documents\Documents\PITCO\Wells Fargo\ChkImages2\WFB 04 01 20 through 04 02 20_page_22.jpg
    C:\Users\Owner\Documents\Documents\PITCO\Wells Fargo\ChkImages2\WFB 04 01 20_page_03.jpg
    C:\Users\Owner\Documents\Documents\PITCO\Wells Fargo\ChkImages2\WFB 04 01 20_page_11.jpg
    C:\Users\Owner\Documents\Documents\PITCO\Wells Fargo\ChkImages2\WFB 04 01 20_page_19.jpg
  • There is no code attached. Maybe you mean


  • Sorry... I have attached my code now. Rm regarding the code you shared, is the missing code on lines 4 and 5. Please advise and thanks for your help. I think I am getting close to figuring it out.


  • Yes... When is use ".Hyperlinks.Add rCl.Offset(, -2)", I get Run-tine error '1004' -- Application-define or object-defined error. If I change that to: .Hyperlinks.Add rCl.Offset(, -1), it seems to cyclye through all 300 rows of file locations in the list, but it does not convert the file locations to hyperlinks.


    Please stay with me until I crack this...


    Much appreciated

  • Here is the full code as modified keeping ".Hyperlinks.Add rCl.Offset(, -2)"