Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default Use VBA to copy a chart from the internet?

I am working on a program that pulls stock information from the internet
directly into Excel. I am using a query table to get stock quotes, which
works great, but I would also like to pull in the default historical chart
that also appears on the web site.

Is this possible? The chart is a 'gif' image and I can right click it and
manually copy it, but I want to be able to do this in one step automatically.
Does anyone know how to do this?

Thanks in advance for your assistance. My code so far follows:

Dim qts As QueryTables
Dim qt As QueryTable

Set qts = ActiveSheet.QueryTables
Set qt = qts.Add(mstrConnection & mstrStockSymbol, Range(ActiveCell.Address))
With qt
.AdjustColumnWidth = True
.BackgroundQuery = False
If .FetchedRowOverflow Then MsgBox "Query too large!"
.FieldNames = True
.PreserveColumnInfo = False
.PreserveFormatting = True
.WebConsecutiveDelimitersAsOne = True
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.WebFormatting = xlWebFormattingNonel
.WebPreFormattedTextToColumns = False
.WebSingleBlockTextImport = False
.WebSelectionType = xlSpecifiedTables
.WebTables = mstrWebTables
.Refresh
End With

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Use VBA to copy a chart from the internet?

http://groups-beta.google.com/group/...a49fffd094fe65

Tim


"quartz" wrote in message
...
I am working on a program that pulls stock information from the internet
directly into Excel. I am using a query table to get stock quotes, which
works great, but I would also like to pull in the default historical chart
that also appears on the web site.

Is this possible? The chart is a 'gif' image and I can right click it and
manually copy it, but I want to be able to do this in one step

automatically.
Does anyone know how to do this?

Thanks in advance for your assistance. My code so far follows:

Dim qts As QueryTables
Dim qt As QueryTable

Set qts = ActiveSheet.QueryTables
Set qt = qts.Add(mstrConnection & mstrStockSymbol,

Range(ActiveCell.Address))
With qt
.AdjustColumnWidth = True
.BackgroundQuery = False
If .FetchedRowOverflow Then MsgBox "Query too large!"
.FieldNames = True
.PreserveColumnInfo = False
.PreserveFormatting = True
.WebConsecutiveDelimitersAsOne = True
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.WebFormatting = xlWebFormattingNonel
.WebPreFormattedTextToColumns = False
.WebSingleBlockTextImport = False
.WebSelectionType = xlSpecifiedTables
.WebTables = mstrWebTables
.Refresh
End With



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
Copy data from internet to excel jj Excel Discussion (Misc queries) 6 October 3rd 08 03:39 PM
How do I copy a mailing list from the internet to Excel? jbutson Excel Discussion (Misc queries) 1 May 30th 07 06:01 PM
Internet Explorer opens a local copy Chris Excel Discussion (Misc queries) 0 June 17th 06 05:47 PM
Copy Internet Favorites To Workbook John Mansfield[_2_] Excel Programming 2 October 20th 04 10:14 PM
Download (copy) file from the internet Jos Vens Excel Programming 1 February 3rd 04 02:14 PM


All times are GMT +1. The time now is 04:45 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"