+ Reply to Thread
Results 1 to 3 of 3

Retrieve Data from Web site

  1. #1
    Les Stout
    Guest

    Retrieve Data from Web site

    Hi all, i need to retrieve a certain figure from the following site
    "http://www.lme.com/lead.asp"
    I need to take the fValue for the "CASH BUYER" and insert it in a
    Worksheet called "LEAD" in the workbook "TM-20 infosheet.xls" in column
    "B" at the end of the data, with yesterday's date on the left in column
    "A", however if it is a Monday then it must be Friday's date. If
    possible i need to do this with the spreadsheet closed.

    Any help and assistance with code would be appreciated.

    Les Stout

    *** Sent via Developersdex http://www.developersdex.com ***

  2. #2
    Tim Williams
    Guest

    Re: Retrieve Data from Web site

    What part are you having a problem with?

    Web data can be got with a web query (Data >> Import External Data >> New web query).
    Refreshing the query (once set up) will get the latest value.

    It's likely you'll have to open the other file to update the value.

    '****************************************************
    dim wb as workbook, r as range

    set wb= workbooks.open("C:\stuff\TM-20 infosheet.xls")
    with wb.sheets("LEAD")
    set r = .cells(.rows.count,2).end(xlup).offset(1,0)
    r.value = thisworkbook.sheets("WebQuery").range("D34").value
    r.offset(0,-1).value=GetYesterdaysDate()
    end with

    wb.save
    wb.close
    '*****************************************************

    Function GetYesterdaysDate()
    'some code here....
    end function


    Tim


    "Les Stout" <[email protected]> wrote in message news:[email protected]...
    > Hi all, i need to retrieve a certain figure from the following site
    > "http://www.lme.com/lead.asp"
    > I need to take the fValue for the "CASH BUYER" and insert it in a
    > Worksheet called "LEAD" in the workbook "TM-20 infosheet.xls" in column
    > "B" at the end of the data, with yesterday's date on the left in column
    > "A", however if it is a Monday then it must be Friday's date. If
    > possible i need to do this with the spreadsheet closed.
    >
    > Any help and assistance with code would be appreciated.
    >
    > Les Stout
    >
    > *** Sent via Developersdex http://www.developersdex.com ***




  3. #3
    Les Stout
    Guest

    Re: Retrieve Data from Web site

    Thank you Tim, sorry for the delay... live in South Africa

    Les Stout

    *** Sent via Developersdex http://www.developersdex.com ***

+ 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