View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
FrigidDigit[_2_] FrigidDigit[_2_] is offline
external usenet poster
 
Posts: 32
Default Programmatically inserting hyperlinks

Hi Dave!

Thanks again for your input!
I have a fname variable that contains the full path of the file that I want
to create a link to. However, when I try to create the formula in the cell
I get an error.

Here is the code I'm using:


fname = objFolder.Path & "\" & objFile.Name
Workbooks("RTI Subcontractor invoices Overview.xls").Worksheets("Invoice
Listing").Range(Addrs).Formula = "=Hyperlink(" & fname & ")"

Can you see what I'm doing wrong?

Thanks so much for the help!
FD

"Dave Peterson" wrote in message
...
Or maybe you could just fill that last column with =hyperlink() formulas:

=hyperlink("File:////" & a1)



FrigidDigit wrote:

Hi Everyone

I have a list of files generated via VBA in a sheet. I would like to
automatically generate a hyperlink to each file (The full path is
generated
in the existing code) and place this hlink in the last column for each
file.

Can this easily be done?

Any help will be much appreciated.

FD


--

Dave Peterson