Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Feb 2002
    Location
    Taranaki, New Zealand
    Posts
    193
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Open URL in user form excel 2007

    Hi there
    When I do a search in an excel user form, in one of the boxes I have a (long) URL. Next to it is a button.
    When I click this button I would like it to open Explorer and take me to where the URL directs it to.

    For instance the URL is the txtfile1 field is http://www.radionz.co.nz/news/nation...r-north-lifted
    How do I get there by clicking on the button that says "Go to URL"

    I can get it to open explorer, but struggle by going to the actual URL

    Thanks

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    You can use the line of code:

    ActiveWorkbook.FollowHyperlink Address:="http://www.radionz.co.nz/news/national/256183/severe-weather-forecast-but-short-lived"

    Steve

  3. #3
    2 Star Lounger
    Join Date
    Feb 2002
    Location
    Taranaki, New Zealand
    Posts
    193
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hi
    That's not what I was after.
    I was looking for a code that says... ActiveWorkbook.Followhyperlink in box txtfile1 and open new tab. Every time you do a new search a different URL will appear and all in box txtfile1

    Thanks

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    That was an example. you could use any text string, literal, from a variable, the textbox.value:
    ActiveWorkbook.FollowHyperlink Address:=txtfile1.value

    Steve

  5. #5
    2 Star Lounger
    Join Date
    Feb 2002
    Location
    Taranaki, New Zealand
    Posts
    193
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thanks heaps !!!!!! that worked just fine...

Posting Permissions

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