+ Reply to Thread
Results 1 to 4 of 4

VBA Loop thru Multiple URLs and Running HTML Requests

  1. #1
    Registered User
    Join Date
    11-18-2016
    Location
    Seattle, Washington
    MS-Off Ver
    2013
    Posts
    60

    VBA Loop thru Multiple URLs and Running HTML Requests

    I'm going to have multiple instrument numbers and URLs to run this code through. The instrument numbers will start in Column B from Row 8 and down. This VBA currently only runs instrument number 19930074944. How can I have it loop through all these instrument numbers and skip blank cells? Thank you so much.

    Please Login or Register  to view this content.
    Last edited by theskyscraper1; 11-20-2016 at 07:26 PM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: VBA Loop thru Multiple URLs and Running HTML Requests

    Stop for blank cells?

    Do you mean skip blank cells?


    Please Login or Register  to view this content.
    Last edited by mehmetcik; 11-20-2016 at 07:51 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    11-18-2016
    Location
    Seattle, Washington
    MS-Off Ver
    2013
    Posts
    60

    Re: VBA Loop thru Multiple URLs and Running HTML Requests

    Yes, skip. Sorry. But how would that work? The code references:

    searchResultsURL = baseURL & "GetRecDataDetail.aspx?rec=19930074944&suf=&bdt=1/1/1947&edt=11/18/2016&nm=&doc1=&doc2=&doc3=&doc4=&doc5="

    I need to edit it so that it's: searchResultsURL = baseURL & "GetRecDataDetail.aspx?rec= & InstNum & "&suf=&bdt=1/1/1947&edt=11/18/2016&nm=&doc1=&doc2=&doc3=&doc4=&doc5="

    Then InstNum has to reference B8 and down. And run all this code on each different URL. I have no idea how to do that. Thanks.

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: VBA Loop thru Multiple URLs and Running HTML Requests

    Double quotes missing.
    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

+ 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] writing multiple files from URLs, as part of a loop
    By Palooka_ in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-22-2015, 01:47 PM
  2. Loop Through Multiple URLS to Import XML Data
    By kjkonsor in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-18-2014, 05:13 PM
  3. Loop thru URLs to extract web data
    By trwlch in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-20-2012, 04:26 AM
  4. Running One Macro in Multiple Worksheets & Loop
    By mjali001 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-10-2011, 04:57 PM
  5. running loop multiple times?
    By mister tom in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-26-2010, 01:43 PM
  6. Replies: 23
    Last Post: 04-25-2006, 01:10 PM
  7. Replies: 24
    Last Post: 04-25-2006, 01:10 PM

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