download info from a web site to Excel

  • Thread starter Thread starter mariaagustina
  • Start date Start date
M

mariaagustina

Hi!
I would like to learn how to use Visual Basic (which came with my
Excel 2007) to download information from a web site and insert the
data into a cell in Excel. For example, suppose I wanted to acces a
Yahoo Finance web page to get a stock price for a given ticket symbol
and put the stock price into a cell in Excel.
My idea is being able to update everyday when the stock market closes,
the cell with the price of the stock in Excel

thanks,

maria agustina
 
Hi!
I would like to learn how to use Visual Basic (which came with my
Excel 2007) to download information from a web site and insert the
data into a cell in Excel. For example, suppose I wanted to acces a
Yahoo Finance web page to get a stock price for a given ticket symbol
and put the stock price into a cell in Excel.
My idea is being able to update everyday when the stock market closes,
the cell with the price of the stock in Excel

thanks,

maria agustina

A quick google search found several examples with the first being a
step-by-step recording (with screen shots and resulting code) you
might consider studying: http://gove.net/home/page21.html

My search: http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=excel+vba+yahoo+finance
for the rest.
 
In message <[email protected]
s.com> of Thu, 15 Jul 2010 07:32:29 in microsoft.public.excel.programmin
g said:
A quick google search found several examples with the first being a
step-by-step recording (with screen shots and resulting code) you
might consider studying: http://gove.net/home/page21.html

My search: http://www.google.com/search?sourceid=chrome&ie=UTF-
8&q=excel+vba+yahoo+finance
for the rest.

Thanks for a reply that may be astoundingly useful to me.
I have coded several queries using the IE Document Object Model.
e.g. It took me a while, but I have full ability to control <http://jour
neyplanner.tfl.gov.uk/user/XSLT_TRIP_REQUEST2?language=en>

OTOH, I am unable to control <http://www.tfl.gov.uk/tfl/corporate/modeso
ftransport/tube/performance/default.asp?onload=entryexit>

I aim to improve my knowledge.
 
Hi!
I would like to learn how to use Visual Basic (which came with my
Excel 2007) to download information from a web site and insert the
data into a cell in Excel. For example, suppose I wanted to acces a
Yahoo Finance web page to get a stock price for a given ticket symbol
and put the stock price into a cell in Excel.
My idea is being able to update everyday when the stock market closes,
the cell with the price of the stock in Excel

thanks,

maria agustina

Maria...You mght want to try a different approach, something like
this...

Sub WebInfo ()

' Get the source code from the web page
my_url = "http://your url"
Set my_obj = CreateObject("MSXML2.XMLHTTP")
my_obj.Open "GET", my_url, False
my_obj.send
my_var = my_obj.responsetext
Set my_obj = Nothing

' Extract the desired info using mid and instr functions
 
Back
Top