Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2006

Tip: Looking for answers? Try searching our database.

Run Time Error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gunny1979 - 31 Mar 2006 20:04 GMT
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=162
382&type=abook&filter=&splurgeUrl=yes&txtArrivalDate1
="
+ Sheets("Sheet2").Range("B11") + "&txtDepartureDate1=" +
Sheets("Sheet2").Range("B12") +
"&locationID=450210&hotel_name=&lastLocation=Farnborough&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

Signature

gunny1979

Tom Ogilvy - 31 Mar 2006 22:42 GMT
Try changine the "+" sign to "&"

Signature

Regards,
Tom Ogilvy

> Hi,
>
[quoted text clipped - 36 lines]
> End With
> End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.