G
gunny1979
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
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