Hi,
Im getting a run time error 13 for the code below!! it says Type
Mismatch.
can anyone see why, i cant!!
Sub getit()
'use this once and then refresh
myurl =
"http://www.all-hotels.com/xbook/servlet/DisplayRates?show=&partner=8&hotl_id=162382&type=a book&filter=&splurgeUrl=yes&txtArrivalDate1="
+ Sheets("Sheet2").Range("B11") + "&txtDepartureDate1=" +
Sheets("Sheet2").Range("B12") +
"&locationID=450210&hotel_name=&lastLocation=Farnb orough&cboArrivalMonths="
+ Sheets("Sheet2").Range("B19") + "&cboArrivalDays=10&cboNights=" +
Sheets("Sheet2").Range("B20") +
"&number_of_adults1=2&number_of_children1=0&number _of_beds1=1"
With
ActiveWorkbook.Worksheets("test").QueryTables.Add( Connection:="URL;" &
myurl, Destination:=Worksheets("test").Cells(1, 1))
FieldNames = True
RowNumbers = False
FillAdjacentFormulas = False
PreserveFormatting = True
RefreshOnFileOpen = False
BackgroundQuery = True
RefreshStyle = xlInsertDeleteCells
SaveData = True
AdjustColumnWidth = True
RefreshPeriod = 0
WebPreFormattedTextToColumns = True
WebSingleBlockTextImport = False
WebDisableDateRecognition = False
WebDisableRedirections = False
Refresh BackgroundQuery:=False
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=528666