B
bj99hulce99
Hello all,
From Excel I'm trying to send a URL to a web page, which returns an
embedded Excel document, copy the data out and paste it into my current
Excel workbook. The problem is that after the followHyperlink, a
Columns("A:G").Select grabs the data on my Excel worksheet, not on the
IE worksheet. I can't figure out how to activate the IE Excel WS so I
can do the select data and copy. How do I toggle between the IE and
Excel application or window.
Here is an example:
Sub openWebGetData()
ActiveWorkbook.FollowHyperlink _
Address:="http://table.finance.yahoo.com/table.csv?s=INTC&a=07&-
b=9&c=2003&d=09&e=12&f=2003&g=d&ignore=.csv", _
NewWindow:=True
Application.Windows(1).ActiveWindow 'I know this is wrong
Columns("A:G").Select
Selection.Copy
Windows("MyFlie.xls").Activate
Sheets.Add
ActiveSheet.Paste
ActiveWorkbook.Close
End Sub
Thanks in advance for the help, (e-mail address removed)
From Excel I'm trying to send a URL to a web page, which returns an
embedded Excel document, copy the data out and paste it into my current
Excel workbook. The problem is that after the followHyperlink, a
Columns("A:G").Select grabs the data on my Excel worksheet, not on the
IE worksheet. I can't figure out how to activate the IE Excel WS so I
can do the select data and copy. How do I toggle between the IE and
Excel application or window.
Here is an example:
Sub openWebGetData()
ActiveWorkbook.FollowHyperlink _
Address:="http://table.finance.yahoo.com/table.csv?s=INTC&a=07&-
b=9&c=2003&d=09&e=12&f=2003&g=d&ignore=.csv", _
NewWindow:=True
Application.Windows(1).ActiveWindow 'I know this is wrong
Columns("A:G").Select
Selection.Copy
Windows("MyFlie.xls").Activate
Sheets.Add
ActiveSheet.Paste
ActiveWorkbook.Close
End Sub
Thanks in advance for the help, (e-mail address removed)