Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've created a Web Query that retrieves information about a certain stock.
Instead of modifying a parameter in the web query address when I want to select a different stock, is there a way to insert the text from a cell on the spreadsheet? example: http://www.finance.yahoo.com/q?s=ibm gets me IBM. Can the parameter "IBM" get input by the user or selected from a cell (say +a10)? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Put the following code worksheet's (where A10 is) WORKSHEET_CHANGE event Assumed your Web Query in sheet1 Private Sub Worksheet_Change(ByVal Target As Range) If Target.Count = 1 And Target.Row = 1 And Target.Column = 10 Then Sheet1.QueryTables(1).Connection = "URL;http://finance.yahoo.com/q?s=" + Target.Value Sheet1.QueryTables(1).Refresh End If End Sub -- Regards Haldun Alay To e-mail me, please remove AT and DOT from my e-mail address. "buckle" , iletide şunu yazdı ... I've created a Web Query that retrieves information about a certain stock. Instead of modifying a parameter in the web query address when I want to select a different stock, is there a way to insert the text from a cell on the spreadsheet? example: http://www.finance.yahoo.com/q?s=ibm gets me IBM. Can the parameter "IBM" get input by the user or selected from a cell (say +a10)? Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Haldun,
I'm getting a value error with your sample. Is the Target.value returning a value or string? Just starting to learn VBE stuff, so I'm a little green. Thanks "Haldun Alay" <haldunalayATyahooDOTcom wrote in message ... Hi, Put the following code worksheet's (where A10 is) WORKSHEET_CHANGE event Assumed your Web Query in sheet1 Private Sub Worksheet_Change(ByVal Target As Range) If Target.Count = 1 And Target.Row = 1 And Target.Column = 10 Then Sheet1.QueryTables(1).Connection = "URL;http://finance.yahoo.com/q?s=" + Target.Value Sheet1.QueryTables(1).Refresh End If End Sub -- Regards Haldun Alay To e-mail me, please remove AT and DOT from my e-mail address. "buckle" , iletide şunu yazdı ... I've created a Web Query that retrieves information about a certain stock. Instead of modifying a parameter in the web query address when I want to select a different stock, is there a way to insert the text from a cell on the spreadsheet? example: http://www.finance.yahoo.com/q?s=ibm gets me IBM. Can the parameter "IBM" get input by the user or selected from a cell (say +a10)? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Parameter Query | Excel Discussion (Misc queries) | |||
Parameter query in MS Query from Excel | Excel Discussion (Misc queries) | |||
Convert hard coded query criteria to Parameter Query | Excel Discussion (Misc queries) | |||
How to choose if I use a parameter or not in a parameter query | Excel Discussion (Misc queries) | |||
How to use a Access Query that as a parameter into Excel database query | Excel Discussion (Misc queries) |