LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to import one section of data from internet?

Using web query, how do i create a macro that will only import a sectio
of the web instead of the entire page. For example, I need to impor
only the current stock data's high, low, close (FEB27) into m
spreadsheet.

Thanks

Here is my code.

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("C3")) Is Nothing Then
Exit Sub
Else

Dim CoSym As String

CoSym = Worksheets("Main").Range("C3").Value

With Sheets("Stock 1").QueryTables(1)
.Connection = _
"URL;http://table.finance.yahoo.com/k?s=" & CoSym
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingAll
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = True
.WebDisableDateRecognition = False
.WebDisableRedirections = True
.Refresh BackgroundQuery:=False
End With

End If
End Su

--
Message posted from http://www.ExcelForum.com

 
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
How do I set up a macro to clear data from a section? bwerner53 Excel Discussion (Misc queries) 1 November 1st 09 05:35 PM
Import data from zip file through Internet Eric Excel Discussion (Misc queries) 3 December 4th 08 02:34 PM
How to import data from a zipped file through Internet? Eric Excel Discussion (Misc queries) 0 December 3rd 08 03:41 PM
Capture cross-section data kyoshirou Excel Discussion (Misc queries) 1 June 6th 07 07:29 AM
autofill formula to every section of data Jason Excel Discussion (Misc queries) 2 December 23rd 06 07:12 PM


All times are GMT +1. The time now is 03:21 PM.

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

About Us

"It's about Microsoft Excel"