Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy data from internet to excel | Excel Discussion (Misc queries) | |||
How do I copy a mailing list from the internet to Excel? | Excel Discussion (Misc queries) | |||
Internet Explorer opens a local copy | Excel Discussion (Misc queries) | |||
Copy Internet Favorites To Workbook | Excel Programming | |||
Download (copy) file from the internet | Excel Programming |