ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Copying Data forma website (https://www.excelbanter.com/excel-discussion-misc-queries/83723-copying-data-forma-website.html)

gunny1979

Copying Data forma website
 

Hi Guys,

I hope someone can help me, I have managed to manipulate a website by
entering some dates into the input boxes then go to another page with
the information I need. I am wondering if anyone knows a macro I can
use to copy the data directly to a new worksheet?? my code is below


Code:
--------------------
Sub HiltonPortsmouth()
Dim ie As Object
On Error GoTo 1
Set objWSS = CreateObject("WScript.Shell")
Set ie = CreateObject("InternetExplorer.Application")

With ie
.Visible = True
.navigate "https://www.hilton.co.uk/Reservation/300_CheckAvailability.jsp?hid=11001839"
Do While busy: DoEvents: Loop
Do While .ReadyState < 4: DoEvents: Loop
With .document.Forms("checkavailabilityform")
.day1.Value = Worksheets("setup").Range("C59").Text
.monthyear1.Value = Worksheets("setup").Range("C60").Text
.day2.Value = Worksheets("setup").Range("C61").Text
.monthyear2.Value = Worksheets("setup").Range("C62").Text
.submit
End With
Set ie = Nothing

Exit Sub

1: MsgBox "Unexpected Error, sorry."
ie.Quit
Set ie = Nothing
End With

End Sub
--------------------


--
gunny1979
------------------------------------------------------------------------
gunny1979's Profile: http://www.excelforum.com/member.php...o&userid=32932
View this thread: http://www.excelforum.com/showthread...hreadid=533707



All times are GMT +1. The time now is 04:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com