Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Mike,
this is a primitive code snippet that might help you on the way. The assumption here is that a webquery already exists on your sheet. Note that not all of the page is imported. You can figure out the selected tables by recording the creation of your webquery with the macro recorder ... Sub ChangeURL(sParam as String) Dim qt As QueryTable If ActiveSheet.QueryTables.Count 0 Then Set qt = ActiveSheet.QueryTables(1) With qt .Connection = "URL;http://finance.yahoo.com/q?s=" & sParam .WebSelectionType = xlSpecifiedTables .WebFormatting = xlWebFormattingNone .WebPreFormattedTextToColumns = True .WebSelectionType = xlSpecifiedTables ' only certain tables are imported ... .WebTables = "19,23,25" .Refresh End With End If End Sub "ThisShouldBeEasy" wrote: Hi, I'm trying to pull down information from a web site. I need to do it multiple times with one of the parameters in the url changing each time. I know it's possible but I can't seem to find the proper way to do this. example: http://finance.yahoo.com/q?s=aa the s=aa would need to change to something like s=ge and then something like s=pfe, etc. Any help greatly appreciated. Mike |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dynamic web query in Excel 2003 | Excel Discussion (Misc queries) | |||
db query with dynamic criteria | Excel Discussion (Misc queries) | |||
Dynamic use of Access query | Excel Programming | |||
Web Query and Dynamic web address | Excel Programming | |||
Dynamic Web Query | Excel Programming |