Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
[QueryTables] showing results on a per row basis
Hi all,
I wish I could show a result of a query on a per row basis, is there a way I could do that? My code: Dim rg as Range Dim dest as Range .... Do Until IsEmpty(rg) stSQL = "SELECT value AS " & rg.Value & " FROM table where obj='" & rg.value & "';" Set qData = wsSheet.QueryTables.Add(Connection:=stODBC, Destination:=dest, Sql:=stSQL) qData.Refresh BackgroundQuery:=False Set rg = rg.Offset(1, 0) Set dest = dest.Offset(1, 0) Loop the rg variable containes the names for the sql where condition, and dest is the destination range passed to the querytables. Actually the result is showed on a per column basis, shiftin down one cell each query (which is not really what I wanted to do 8-B). Thank you, Giuseppe |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF formula only showing positive results | Excel Discussion (Misc queries) | |||
Formulas not showing results | Excel Worksheet Functions | |||
can i colour a cell on basis of results of a formula e.g clour bl. | Excel Worksheet Functions | |||
help in showing results of database query | Excel Programming | |||
Formula, not results showing | Excel Programming |