close

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 belowCode:
--------------------
Sub HiltonPortsmouth()
Dim ie As Object
On Error GoTo 1
Set objWSS = CreateObject(quot;WScript.Shellquot;)
Set ie = CreateObject(quot;InternetExplorer.Applicationquot;)

With ie
.Visible = True
.navigate quot;https://www.hilton.co.uk/Reservation/300_CheckAvailability.jsp?hid=11001839quot;
Do While busy: DoEvents: Loop
Do While .ReadyState lt;gt; 4: DoEvents: Loop
With .document.Forms(quot;checkavailabilityformquot;)
.day1.Value = Worksheets(quot;setupquot;).Range(quot;C59quot;).Text
.monthyear1.Value = Worksheets(quot;setupquot;).Range(quot;C60quot;).Text
.day2.Value = Worksheets(quot;setupquot;).Range(quot;C61quot;).Text
.monthyear2.Value = Worksheets(quot;setupquot;).Range(quot;C62quot;).Text
.submit
End With
Set ie = Nothing

Exit Sub

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

End Sub
----------------------
gunny1979
------------------------------------------------------------------------
gunny1979's Profile: www.excelforum.com/member.php...oamp;userid=32932
View this thread: www.excelforum.com/showthread...hreadid=533707

全站熱搜
創作者介紹
創作者 software 的頭像
software

software

software 發表在 痞客邦 留言(0) 人氣()