Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default vba yahoo! finance

Is it possible to write a routine in VBA that can download current
stock prices from, say, Yahoo! Finance, and then update a workbook
with that information? If so, I'd appreciate any pointers on how to
do so.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default vba yahoo! finance

This will do it. Contact me privately for more.

Sub getit()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.Calculation = xlCalculationManual
Set datasheet = ActiveSheet
With datasheet
Range("a3:a200").EntireRow.Delete
End With
qurl = "http://table.finance.yahoo.com/k?s=ibm&g=d"
With datasheet.QueryTables.Add(Connection:="URL;" & qurl,
Destination:=datasheet.Range("B7"))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With
Application.Calculation = xlCalculationAutomatic
Application.DisplayAlerts = True
End Sub

--
Don Guillett
SalesAid Software
Granite Shoals, TX

"Arun Ram Kumaran" wrote in message
...
Is it possible to write a routine in VBA that can download current
stock prices from, say, Yahoo! Finance, and then update a workbook
with that information? If so, I'd appreciate any pointers on how to
do so.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel web query does not import table (from yahoo finance) correct Jerome Excel Discussion (Misc queries) 1 April 19th 09 01:21 PM
Pulling stock quotes from Yahoo Finance into a spreadsheet [email protected] Excel Discussion (Misc queries) 1 November 8th 06 10:09 AM
Finance Formula Help JCH Excel Worksheet Functions 3 April 10th 06 04:45 PM
Web queries & Yahoo! Finance cwhaley Excel Discussion (Misc queries) 1 February 2nd 06 12:31 AM
Web Queries to Yahoo garysm99 Excel Discussion (Misc queries) 0 September 14th 05 06:09 PM


All times are GMT +1. The time now is 01:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"