+ Reply to Thread
Results 1 to 4 of 4

VBA Macro to Scrape Website - Post to Javascript

  1. #1
    Registered User
    Join Date
    09-30-2013
    Location
    New york, NY
    MS-Off Ver
    Excel 2007
    Posts
    5

    VBA Macro to Scrape Website - Post to Javascript

    Hi
    I am trying to navigate the following webpage using VBA behind excel but am stuck.

    http://timessquare.hyatt.com/en/hotel/home.html

    I am trying to enter dates in the "Arrive" and "Depart" text fields and then click the "Check Availability" button.



    objIE.navigate "http://timessquare.hyatt.com/en/hotel/home.html"
    Do While objIE.Busy Or objIE.readyState <> 4
    DoEvents
    Loop


    Set checkInDate = .document.getElementsById("arrive")
    If Not (checkInDate.Item(0) Is Nothing) Then
    checkInDate.Item(0).Value = "Jan / 25 / 2014"
    End If


    My code goes into the if statement but does not change the value of the date (as displayed on the webpage). I have tried entering the date using various ways but it does not work.

    Could someone please help me.

    Thanks
    S

  2. #2
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: VBA Macro to Scrape Website - Post to Javascript

    Hi shahzeb and welcome to the forum!

    Try this:

    Please Login or Register  to view this content.
    Last edited by berlan; 01-21-2014 at 05:32 PM.

  3. #3
    Registered User
    Join Date
    09-30-2013
    Location
    New york, NY
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: VBA Macro to Scrape Website - Post to Javascript

    This is brilliant!! Thanks so much.

  4. #4
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: VBA Macro to Scrape Website - Post to Javascript

    Glad it worked, and thanks for the feedback and positive rep!

    //berlan

+ 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. Replies: 0
    Last Post: 10-16-2013, 10:58 AM
  2. [SOLVED] Pull Specific Data from Website (Screen Scrape)
    By CHRISEWRIGHT20 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-11-2012, 11:03 AM
  3. Replies: 1
    Last Post: 09-20-2012, 11:51 AM
  4. VBA to scrape data from website
    By jdub22cb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-16-2012, 04:00 PM
  5. Read javascript text on a website
    By pfrattali in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-13-2011, 06:59 AM

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