+ Reply to Thread
Results 1 to 6 of 6

Macro to Open hyperlink

  1. #1
    Registered User
    Join Date
    05-23-2007
    Posts
    41

    Question Macro to Open hyperlink

    Hi,

    i have list of link in my excel sheet such as

    S:\Statements\ABC.txt

    i need a macro to open these link, because whenever i click on the link, it opens a new Excel and i can't do the links

    thanks

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Macro to Open hyperlink

    You can "click" a hyperlink in VBA like this:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-23-2007
    Posts
    41

    Re: Macro to Open hyperlink

    hi thx however the code didn't work, it only worked with weblinks "http:// etc."

  4. #4
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Macro to Open hyperlink

    What type of file are you trying to open? I can open .txt and .pdf etc with the follow command. Will it always be the same type of file? If so you could get the address property of the hyperlink and then use the program to open it or a shell command or something.

  5. #5
    Registered User
    Join Date
    05-23-2007
    Posts
    41

    Re: Macro to Open hyperlink

    Actually I’m recording, so in the process i want excel to open 10 text files in my drive, the path/links of the files are A1:A10, i hyperlinked the path by the hyperlink formula and recorded the opening one by one, however it opened them in separate excel, so i couldn’t link the values.

    and still the code you provided couldn't open the files

  6. #6
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Macro to Open hyperlink

    Can you upload a sample of the workbook with the links and the code you have to open in separate excel? For me, if I click a hyperlink to a text file it opens it in notepad, I don't understand exactly what it is that you are doing..

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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