ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Problem with Importing Data to Spreadsheet (https://www.excelbanter.com/excel-programming/291575-problem-importing-data-spreadsheet.html)

kenji4861[_5_]

Problem with Importing Data to Spreadsheet
 
I am using this code to retrieve data, but it gives me an error on th
"Refresh" line.

Error - "Run-time error '1004': Method 'Refresh' of objec
"_QueryTable" failed.

---------------------------
With Sheet1.QueryTables.Add(Connection:= _
"URL;" + dataWebsiteString, _
Destination:=Range("A1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = True
.Refresh BackgroundQuery:=False
.SaveData = True
End With
---------------------------

The code seems to work for shorter data, but long datas don't work
Thanks for any help

--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

Problem with Importing Data to Spreadsheet
 
Generally I believe this is an indication there is a problem with your
connection/connection string.

--
Regards,
Tom Ogilvy

"kenji4861 " wrote in message
...
I am using this code to retrieve data, but it gives me an error on the
"Refresh" line.

Error - "Run-time error '1004': Method 'Refresh' of object
"_QueryTable" failed.

---------------------------
With Sheet1.QueryTables.Add(Connection:= _
"URL;" + dataWebsiteString, _
Destination:=Range("A1"))
BackgroundQuery = True
TablesOnlyFromHTML = True
Refresh BackgroundQuery:=False
SaveData = True
End With
---------------------------

The code seems to work for shorter data, but long datas don't work.
Thanks for any help!


---
Message posted from http://www.ExcelForum.com/




kenji4861[_6_]

Problem with Importing Data to Spreadsheet
 
There's no problem with the connection. The URL works perfectly for the
PC. It's just the Mac giving me problems. It works on smaller datas.


---
Message posted from http://www.ExcelForum.com/



All times are GMT +1. The time now is 04:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com