Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 507
  • Last Modified:

Convert into hyperlink

Hi all,

I got a Access database table with one of its table storing :
as text, the filed name lets say is folder_path

then i use the 'worksheets("Sheet1").CopyFromRecordset rs' to paste the whole table onto sheet1, where rs is the recordset having the query result

my problem is... i need to let user to click on the folder_path and it will automatically open up the folder, however the 'file:///E:/Temp/' appear as a normal text in Excel, which i cannot click on it as a hyperlink

wat should i do to format the cell to show the text as hyperlink? it has to be done in code and dynamically.

Thanks a lot.
  • 2
1 Solution
Paths are not seen automatically as valid hyperlinks in Excel.

You may need a loop-type macro that you can run on this stuff to turn it into a hyperlink.
You can try by recording a macro function... the result is something like this:
   ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
this code does link an Excel worksheet. maybe can try this to link an access db.
KCChanAuthor Commented:
It works, thanks. :)

You're welcome. Tk cr. :)

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now