Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try changine the "+" sign to "&"
-- Regards, Tom Ogilvy "gunny1979" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Visual Basic Error Run Time Error, Type Mismatch | Excel Discussion (Misc queries) | |||
run-time error '1004': Application-defined or object-deifined error | Excel Programming | |||
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error | Excel Programming | |||
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) | Excel Programming | |||
Run-time error '11' & Run-time error '1004' | Excel Programming |