Macro and Edit query help

  • Thread starter Thread starter qitrader888
  • Start date Start date
Q

qitrader888

Hi
I'm new with VB in excel and I would like to automate a web query
function to gather new data everytime I change the stock symbol. Here
are the descriptions and any hints or tips is always appreciated.

sheet #1, enter symbol into cell (C3)
copy symbol in C3
Go to sheet #2
Edit query
(http://table.finance.yahoo.com/d?a=10&b=23&c=2003&d=1&e=24&f=2004&g=d&s=)
paste symbol into box
Get data
Select entire page
Import
Go back to sheet #1

Is there a macro for this?
I am having trouble when i have to bring in the webquery.


THanks
 
Is this right? what am i missing? it does not seem to work. I'm usin
Office system 2003

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$3" Then
With QueryTables("myQueryTable")
.Connection
"URL;http://table.finance.yahoo.com/d?a=...&g=d&s=)" & _
CStr(Range("C3").Value) & "&d=t"
.Refresh False
End With
End If
End Su
 
Back
Top