Help With Excel Web Query

S

sethster

Anyone have any experience with web queries from Excel Visual Basic ?
I tried this:

Sub test()
With
ActiveSheet.QueryTables.Add(Connection:="URL;http://webservices.pcquote.com/cgi-"
& "bin/excelget.exe?Ticker=msft", Destination:=Range("a1"))
..BackgroundQuery = True
..TablesOnlyFromHTML = True
..Refresh BackgroundQuery:=False
..SaveData = True
End With
End Sub

But it cant find the server or proxy.

Thanks,
Seth
 
H

Hilena Hailu [MSFT]

Hello Seth,

We apologize for the delay in response to your posting.

I tried the Web Query code you provided and it looks like the address is
incorrect. The correct address is
http://www.pcquote.com/stocks/index.php?symbols=msft.

For someone who is new to writing Web Query macros, I usually encourage
recording a macro while doing a Web Query using one of the default Query
files found in the Queries folder then looking at the VBA code and modifying
it as appropriate.

Hope this helps. Let us know if you have further questions.

Regards,
Hilena Hailu
Macintosh Business Unit
Microsoft Corp.
 

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