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: 140
  • Last Modified:

Extract as text the location of embedded hyperlink in a cell

Hi Hi

i want a UDF or any solution that can extract the the location address of a hyperlink.  

i am familiar with the hyperlink.address property but this one is different. please see attached file.

wowee
Hyperlink.xlsb
0
Flora
Asked:
Flora
  • 2
1 Solution
 
Glenn RayExcel VBA DeveloperCommented:
Here's a simple function:
Public Function GetHyper(rng As Range) As String
    GetHyper = rng.Hyperlinks(1).Address
End Function

Open in new window


It does not return the "file:///" part, but will show the full filepath (E:\My Document\MyPhoto.jpg)

Regards,
-Glenn
0
 
FloraAuthor Commented:
Hi Glenn,

it just returned  My Document\MyPhoto.jpg  it does not give me the correct location path string with filename.

any idea why it does not work?
0
 
Glenn RayExcel VBA DeveloperCommented:
I saw that also.  But when I created a couple of new hyperlinks (to local documents on my hard drive) the full path displayed properly.  I just presumed it was an artifact of the file being saved here on EE.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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