ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro and Edit query help (https://www.excelbanter.com/excel-programming/292606-macro-edit-query-help.html)

qitrader888

Macro and Edit query help
 
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=1...&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


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


qitrader888[_2_]

Macro and Edit query help
 
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

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



All times are GMT +1. The time now is 12:27 AM.

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