+ Reply to Thread
Results 1 to 3 of 3

VBA Macro to retrieve webpage values - updating issue

  1. #1
    Registered User
    Join Date
    02-25-2015
    Location
    Denver, CO
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    2

    VBA Macro to retrieve webpage values - updating issue

    I'm having issues with a macro I've created in the attached sheet. The macro is set to retrieve values from the 3 tables on the following webpage: http://www.us.jll.com/united-states/...Interest-Rates

    The first time I click the button to run the macro, the values are retrieved properly (aside from transposing the first row as a column underneath - any help eliminating this is appreciated).
    If I want to update these values by clicking the macro button again, it will only retrieve the column headings from the 3 tables and places them in the 1st 3 rows.

    I'm new to VBA, so any help is much appreciated!

    Underwriting Model New Color with Explanations.xlsm

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA Macro to retrieve webpage values - updating issue

    I do not see any wrong with your code.
    Yes, I have re-run the code a couple of times. When you run the code by pressing F8, all the data are copied, but not when I press the button. I suspect this line could be the reason.

    Please Login or Register  to view this content.
    When I change it to these lines, I do not get an error
    Please Login or Register  to view this content.
    The code sometimes might not work as there is time lag between log in and data retrieval. The data are also retrieved from the body of the table.
    I do not know if you include a timer in your code will help.
    Application.Wait (Now + TimeSerial(0, 0, 5))
    As to the first as column underneath, this is because you are getting a text, so the code will copy the picture if there are not text, not the picture.
    Last edited by AB33; 12-08-2015 at 05:47 AM.

  3. #3
    Registered User
    Join Date
    02-25-2015
    Location
    Denver, CO
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    2

    Re: VBA Macro to retrieve webpage values - updating issue

    Looks like that did the trick. Thanks so much for your help and the quick reply!!

+ 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. Save as Webpage Issue
    By caffeineaddict in forum Excel General
    Replies: 0
    Last Post: 05-11-2015, 06:11 AM
  2. How to Fetch a table values in a webpage to Excel sheet using VBA Macro??? Help Me
    By ParthibanPalaniswamy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-20-2013, 05:08 AM
  3. Excel 2010- Links keep breaking, updating values issue too
    By psumeb in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-15-2013, 01:16 PM
  4. Macro to Open webpage, then save webpage as txt file.
    By jasocke2 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-07-2012, 04:25 AM
  5. VBA Script to retrieve text from label on webpage
    By Manifest0 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-23-2011, 10:44 PM
  6. Retrieve information from already opened webpage?
    By msy12 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-27-2009, 06:52 PM
  7. Updating an excel chart on a webpage
    By Anthony Blackburn in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-29-2006, 12:20 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