Visual Basic GetAddress (Hyperlink) from Excel String -
i have vb in excel extracts hyperlink pasted cell:
function getaddress(hyperlinkcell range) string if hyperlinkcell.hyperlinks.count > 0 getaddress = replace(hyperlinkcell.hyperlinks(1).address, "mailto:", "nothing here") else getaddress = "" end if end function
the problem strips in hyperlink after # e.g.
http://en.wikipedia.org/wiki/technical_support#tier.2flevel_1_.28t1.2fl1.29
becomes
http://en.wikipedia.org/wiki/technical_support
any suggestions on how request whole string?
how about:
function getaddress(hyperlinkcell range) string if hyperlinkcell.hyperlinks.count > 0 getaddress = replace(hyperlinkcell.hyperlinks(1).address, "mailto:", "nothing here") getaddress = getaddress & "#" & hyperlinkcell.hyperlinks(1).subaddress else getaddress = "" end if end function
Comments
Post a Comment