+ Reply to Thread
Results 1 to 14 of 14

macro automatically clicking links in cells

  1. #1
    Registered User
    Join Date
    07-19-2009
    Location
    Alaska
    MS-Off Ver
    Excel 2003
    Posts
    8

    macro automatically clicking links in cells

    Hey all,

    I have a list of links in 1 excel worksheet. They are spaced every other row if it makes a difference. I need to create a macro that clicks on every link automatically. Each link is a direct file that I need downloaded every few months. I have no Macro experience beyond hitting record to automate basic tasks.

    cheers!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    re: macro automatically clicking links in cells

    Hello akxander,

    Welcome to the Forum!

    Are you referring to HyperLinks? If you are and these have been created using the fomula "=HYPERLINK" then answer is no. You can't use VBA to click them.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    07-19-2009
    Location
    Alaska
    MS-Off Ver
    Excel 2003
    Posts
    8

    re: macro automatically clicking links in cells

    Hi,

    Thanks for the speedy reply. They are links as follows:

    http://XXXX.com/reports/XXXX.aspx?ci...=1&e=57&ft=pdf
    That's exactly how it is in the formula. Just the link.

    It's a sequential set of links that need to be downloaded.

    I hope that answers your question.

    Thanks!

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    re: macro automatically clicking links in cells

    Hello AKxander,

    Can you post a your workbook or a sample workbook? Since there are different types of Hyperlinks, it will be easier to answer your question with the actual workbook.

  5. #5
    Registered User
    Join Date
    07-19-2009
    Location
    Alaska
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Help with macro automatically clicking links in cells

    Absolutely! Here's a sample version of what I'm trying to work with.

    Thanks
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    Re: macro automatically clicking links in cells

    Hi
    try the macro in the attached file
    ravi
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-19-2009
    Location
    Alaska
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: macro automatically clicking links in cells

    Hi, I got the error compile error: sub or function not defined.

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: macro automatically clicking links in cells

    Hello akxander,

    Thanks for posting the workbook. The hyperlinks on the worksheet can be opened from VBA. This macro has already been added to the attached workbook and can be run by clicking the button on "Sheet1".
    Please Login or Register  to view this content.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    07-19-2009
    Location
    Alaska
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: macro automatically clicking links in cells

    Thanks much! The macro does what I want it to do. My only issue is that the site where I need to download data seems to redirect when I run the macro, but if I go to the link and click on it the file downloads fine. Any ideas?

  10. #10
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: macro automatically clicking links in cells

    Hello akxander,

    A hyperlink to a URL can have 2 parts. The main page and redirect to another page on the site. I would need to split the addresses and assign them to the proper Hyperlink properties. Can you post the address?

  11. #11
    Registered User
    Join Date
    07-19-2009
    Location
    Alaska
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: macro automatically clicking links in cells

    I can post the address I suppose, but I'd also like to know how you do it so I can do it myself in the future.

    It's a boat load links, but only 1 digit changes for each file.

    I'll load the actual list when I get back to my work laptop if that's what you want.

    Thanks!

  12. #12
    Registered User
    Join Date
    07-19-2009
    Location
    Alaska
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: macro automatically clicking links in cells

    Sorry my reply took so long. I've been out of town. Anyway, I'll be at my office in an hour or so to upload the xls file. Unfortunately they are password protected links so you have no way of telling if it will work. Still want the file?

    thanks a ton!

  13. #13
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: macro automatically clicking links in cells

    Hello akxander,

    It would help to see the file. There maybe something I am missing about how all this works.

  14. #14
    Registered User
    Join Date
    07-19-2009
    Location
    Alaska
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: macro automatically clicking links in cells

    Sounds good. Here is the file.
    If it makes a difference, I plan on whittling down that list to about a 10th of the size once I get everything working.
    Thanks
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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