+ Reply to Thread
Results 1 to 7 of 7

VBA HTTP request not updating

  1. #1
    Forum Contributor
    Join Date
    03-11-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016 (among others!)
    Posts
    331

    VBA HTTP request not updating

    I have the following piece of code to simply pick up a date from a webpage.


    Please Login or Register  to view this content.

    It runs fine but to test it I changed the date in the database serving the php page but the answer it was pulling in is still the old value. If I check the php page it queries online it gives the new date. I'm presuming I have either to close the request or force a refresh but no idea how. Can anyone give me any pointers? TIA

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: VBA HTTP request not updating

    if you want to terminate any memory that's stuck, just quit excel. is that what you're asking? according to this:

    https://docs.microsoft.com/en-us/pre...57849(v=vs.85)

    your bool arg is not causing async. so that's the easiest way to do it, obviously, in terms of using resources that are NOT risky. async is the worst, because it is heavily overused and no-one has any control over when it gets stuck and has to be forced to quit by manual work done by humans. it's not perfect, nor has it ever been. have you looked here?

    https://www.google.com/search?q=MSXM...nse+text+wrong

    or here?

    https://www.google.com/search?q=MSXM...t+return+wrong

  3. #3
    Forum Contributor
    Join Date
    03-11-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016 (among others!)
    Posts
    331

    Re: VBA HTTP request not updating

    Thanks for that. I'll get a better look later but closing it is not really an option in the long term due to the way it is likely to be used. I had sort of thought there may be a "refresh" type issue. I'll check those links though. Thanks.

  4. #4
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: VBA HTTP request not updating

    here's some more:

    https://www.google.com/search?q=vba+...method+refresh

    https://www.google.com/search?q=vba+...equest+refresh

    and someone else apparently complained about the same thing you are complaining about:

    https://stackoverflow.com/questions/...-doesnt-update

  5. #5
    Forum Contributor
    Join Date
    03-11-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016 (among others!)
    Posts
    331

    Re: VBA HTTP request not updating

    Thanks for these. After reading through them I went with adding the line:
    Please Login or Register  to view this content.
    WHich, at least the first couple of times of trying, appears to have solved the issue.

  6. #6
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: VBA HTTP request not updating

    well good for you!

  7. #7
    Forum Contributor
    Join Date
    03-11-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016 (among others!)
    Posts
    331

    Re: VBA HTTP request not updating

    In case someone else stumbles on this it appears it doesn't always work.

+ 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. Missing HTTP request header parameters
    By aliadils3d in forum Excel General
    Replies: 3
    Last Post: 04-15-2020, 01:38 PM
  2. HTTP request in VBA
    By leslietsz in forum Excel Programming / VBA / Macros
    Replies: 36
    Last Post: 12-10-2016, 11:10 AM
  3. Wait for winhttp request to be done (much like XML http request)
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 07-23-2015, 09:26 AM
  4. SENDING HTTP REQUEST and GETTING RESPONSE
    By downtown1933 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2013, 09:43 PM
  5. VBA HTTP GET request
    By WAW in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-21-2012, 05:08 PM
  6. Http Request Repsonse Query
    By Killavirus in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-25-2010, 07:38 PM
  7. Sending HTTP request with parameter.
    By gajendra.gupta in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-18-2007, 04:45 AM

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