+ Reply to Thread
Results 1 to 6 of 6

VBA code for hyperlink VS link

  1. #1
    Forum Contributor
    Join Date
    04-28-2016
    Location
    Stavanger, Norway
    MS-Off Ver
    365
    Posts
    142

    VBA code for hyperlink VS link

    Okay so I got a model in ArcGIS that find a lot of links, these links are then copied into a spreadsheet by a VBA script together with a lot of other data.
    Then I got a line of code that finds these links

    Please Login or Register  to view this content.
    I noticed that my links are not actually defined as hyperlinks until I click them and hit enter, is there a code to recognize just http/html links or do they have to be active hyperlinks?

    Thanks in advance

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: VBA code for hyperlink VS link

    How are you copying the links into the cells?

    Are they valid URLs?
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    04-28-2016
    Location
    Stavanger, Norway
    MS-Off Ver
    365
    Posts
    142
    Quote Originally Posted by Norie View Post
    How are you copying the links into the cells?

    Are they valid URLs?
    I will need to look into it when I'm near a pc, but yeah they are valid urls, but just not hyperlink (not blue text)

  4. #4
    Forum Contributor
    Join Date
    04-28-2016
    Location
    Stavanger, Norway
    MS-Off Ver
    365
    Posts
    142

    Re: VBA code for hyperlink VS link

    Quote Originally Posted by Norie View Post
    How are you copying the links into the cells?

    Are they valid URLs?
    Im using this code;

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    04-28-2016
    Location
    Stavanger, Norway
    MS-Off Ver
    365
    Posts
    142

    Re: VBA code for hyperlink VS link

    And this is the code to open the hyperlinks,

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    04-28-2016
    Location
    Stavanger, Norway
    MS-Off Ver
    365
    Posts
    142

    Re: VBA code for hyperlink VS link

    Could I manybe use; xlCellTypeAllValidation so that I could set a requirement of "http://"?
    Maybe RegEx with something like this; /(??:https?|ftp|file):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$])/igm
    Last edited by mss90; 05-13-2016 at 05:35 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] How to use a hyperlink within the code, when the link is written in a sheet?
    By birbjo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-26-2014, 05:58 PM
  2. VBA to link hyperlink to hiddden worksheet - help with VBA code needed
    By CristinaMR in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-30-2013, 05:34 AM
  3. Hyperlink to run VBA code using auto fill for =hyperlink
    By chevelle8719 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-21-2010, 02:45 PM
  4. Link (hyperlink?) to a FOLDER
    By laluna75 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-05-2007, 10:46 AM
  5. Hyperlink link to worksheet
    By allie123 in forum Excel General
    Replies: 2
    Last Post: 06-28-2007, 10:16 AM
  6. possible to link a hyperlink?
    By shellshock in forum Excel General
    Replies: 1
    Last Post: 07-06-2005, 04:11 PM
  7. [SOLVED] link to a hyperlink cell
    By J. in forum Excel General
    Replies: 5
    Last Post: 03-01-2005, 11:08 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1