B
bob
instead of using this to go to a website how would i import it into excel.
Sub test()
ActiveWorkbook.FollowHyperlink _
Address:="http://finance.yahoo.com/q?s=AAAA&d=c&t=1d&l=on&z=b&q=l"
End Sub
the other part is i have a sheet name created for each stock how would i
write a macro that says if sheet name is AAAA plug that into the web address
to import into corresponding sheet name. the following creates the sheet
name for each stock option downloaded and i want to import a matching graph
from yahoo.
Workbooks.Add
For Each Symbol In SymbRange
If Symbol.Value = "" Then
Application.StatusBar = False
Exit Sub
Application.StatusBar = "Now processing " & Symbol.Value
For Each Sht In Worksheets
If Sht.Name = Symbol.Value Then GoTo SkipSymbol
Next Sht
Worksheets.Add after:=ActiveSheet
ActiveSheet.Name = Symbol.Value
connectURL = "URL;http://quote.cboe.com/QuoteTable.dat"
Process:
If Range("A1") = "CBOE - Chicago Board Options Exchange" Then
Cells.Clear
With Range("A1")
.Value = "No options for " & Symbol.Value
.Font.Bold = True
End With
Cells.Columns.AutoFit
GoTo SkipSymbol
End If
thanks
Sub test()
ActiveWorkbook.FollowHyperlink _
Address:="http://finance.yahoo.com/q?s=AAAA&d=c&t=1d&l=on&z=b&q=l"
End Sub
the other part is i have a sheet name created for each stock how would i
write a macro that says if sheet name is AAAA plug that into the web address
to import into corresponding sheet name. the following creates the sheet
name for each stock option downloaded and i want to import a matching graph
from yahoo.
Workbooks.Add
For Each Symbol In SymbRange
If Symbol.Value = "" Then
Application.StatusBar = False
Exit Sub
Application.StatusBar = "Now processing " & Symbol.Value
For Each Sht In Worksheets
If Sht.Name = Symbol.Value Then GoTo SkipSymbol
Next Sht
Worksheets.Add after:=ActiveSheet
ActiveSheet.Name = Symbol.Value
connectURL = "URL;http://quote.cboe.com/QuoteTable.dat"
Process:
If Range("A1") = "CBOE - Chicago Board Options Exchange" Then
Cells.Clear
With Range("A1")
.Value = "No options for " & Symbol.Value
.Font.Bold = True
End With
Cells.Columns.AutoFit
GoTo SkipSymbol
End If
thanks