Question about QueryTables.add

K

Kenji

I use the following code to import a file onto my excel sheet. However,
when I do it twice, excel gives an error on the " .Refresh
BackgroundQuery:=False" and excel pretty much becomes unstable. How can I
fix this problem? Thanks!

------------
With Sheet7.QueryTables.Add(Connection:= _
"URL;" + "http://www.whatever.com/test.txt", _
Destination:=Range("A1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = True
.Refresh BackgroundQuery:=False
.SaveData = True
End With
 
K

Kenji

Nevermind, the xml sheet I was getting was a blank.. that was why.

<xml></xml> will cause this error.

Kenji
 

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