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

x
  • 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 :
file:///E:/Temp/
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.
0
KCChan
Asked:
KCChan
  • 2
1 Solution
 
DreamboatCommented:
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.
0
 
RajmafiaCommented:
You can try by recording a macro function... the result is something like this:
   ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
        "\\PCTOH\PUBLIC\KTSect4_181002.xls"
this code does link an Excel worksheet. maybe can try this to link an access db.
0
 
KCChanAuthor Commented:
It works, thanks. :)

0
 
RajmafiaCommented:
You're welcome. Tk cr. :)
0

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