Problem with Importing Data to Spreadsheet

K

kenji4861

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
 
T

Tom Ogilvy

Generally I believe this is an indication there is a problem with your
connection/connection string.
 
K

kenji4861

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top