importing web page

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
 

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