Consulting

Results 1 to 3 of 3

Thread: Extract URL with the hashtag #

  1. #1
    VBAX Mentor
    Joined
    Feb 2016
    Location
    I have lived in many places, I love to Travel
    Posts
    413
    Location

    Extract URL with the hashtag #

    Now good Friday all,

    I had some hyperlinks in my excel cells

    Now the below works


     Dim HL As Hyperlink
        For Each HL In ActiveSheet.Hyperlinks
        HL.Range.Offset(0, 1).Value = HL.Address
        Next
    It fails to work correctly on the ones that have this # sign in them


    rg/TR/2018/REC-201413567028/infrastructure.html#tested-0

    And I do need the complete hyperlink

    I cant think why this isssue

    How may I extract the complete url

    I had an alternative idea may be some maipulation but im still thinking
    Cheers for your help

    dj

    'Extreme VBA Newbie in progress - one step at a time - like a tortoise's pace'


  2. #2
    VBAX Master
    Joined
    Jul 2006
    Location
    Belgium
    Posts
    1,286
    Location
    Try HL.Name instead of HL.Address
    other possibilities ...
    MsgBox HL.TextToDisplay
    MsgBox HL.Address
    MsgBox HL.Name
    Charlize

  3. #3
    VBAX Mentor
    Joined
    Feb 2016
    Location
    I have lived in many places, I love to Travel
    Posts
    413
    Location
    Thank you Charlize,

    thats given me some more ideas
    let me do some testing
    Cheers for your help

    dj

    'Extreme VBA Newbie in progress - one step at a time - like a tortoise's pace'


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •