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 looping to through rows

i am writing a code to output data from a database called PHD to a
sheet called PI_PHD. when you select a range of tags to output from
the values are output across the columns instead of being output down
in rows. this cannot be helped. the way around is to repeat the
database call for each different tag. the code is as follows:

Sub GetData()

Dim StartTime, EndTime, TimeIncrement, TagList, TEMP1, TEMP1_1, TEMP2,
Dim TEMP3

StartTime = "PI_PHD!$B$1,"
EndTime = "PI_PHD!$B$2,"
TimeIncrement = "PI_PHD!$B$3"
TagList = "PI_PHD!$A$7:$A$7,"
TEMP1 = "=PHDGetData(""PHD_HOST"","
'TEMP1_1 = "*=PHDGetData(""PHD_HOST"","
TEMP2 = """"", ""Snapshot"","
TEMP3 = ",0, ""After"", UNI_RET_VALUE, UNI_PRES_MERGED)"
Sheets("PI_PHD").Select
Range("b7") = TEMP1 & TagList & StartTime & EndTime & TEMP2 &
TimeIncrement & TEMP3

End Sub

essentially i want to cycle tag list through A8, A9, A10 etc to the
end of data

please help!

 
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
looping through columns and rows Guerilla Excel Programming 4 March 22nd 07 09:31 PM
looping through rows and columns mattguerilla Excel Discussion (Misc queries) 1 March 20th 07 05:14 PM
Not looping through rows bg18461[_18_] Excel Programming 2 August 4th 06 04:35 PM
Looping a selection of rows Andre Kruger Excel Discussion (Misc queries) 1 December 15th 05 04:18 PM
Looping through visible rows only Rasmus[_3_] Excel Programming 1 April 10th 05 02:08 AM


All times are GMT +1. The time now is 06:18 AM.

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"