Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default [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
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
IF formula only showing positive results Davidm Excel Discussion (Misc queries) 2 August 19th 08 05:17 AM
Formulas not showing results sonar Excel Worksheet Functions 2 August 31st 05 04:07 PM
can i colour a cell on basis of results of a formula e.g clour bl. K Excel Worksheet Functions 3 November 4th 04 06:18 PM
help in showing results of database query andy[_6_] Excel Programming 1 August 27th 04 08:47 AM
Formula, not results showing bruce forster Excel Programming 2 April 3rd 04 07:00 PM


All times are GMT +1. The time now is 02:55 AM.

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

About Us

"It's about Microsoft Excel"