View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
diamond diamond is offline
external usenet poster
 
Posts: 5
Default Adding rows in the array

I have following code and I want to put each row (with few changes) into
array so that in the end all the "changed" rows would be in one array. Any
clue how to do this? Thanks!

Sub TestGetRows()
Dim varValues As Variant
Dim recSales As Recordset
Dim intRowCount As Integer
Dim intFieldCount As Integer
Dim SQL As Variant
Dim iSQL As Variant
Dim i As Integer
Dim j As Integer
i = 0
Set recSales = CurrentDb().OpenRecordset("xy")
varValues = recSales.GetRows(2)
recSales.Close

intFieldCount = UBound(varValues, 1)
intRowCount = UBound(varValues, 2)

For j = 0 To intRowCount
iSQL(j) = varValues(0, j) & "','" & varValues(1, j) & "','" &
varValues(2, j)


Next
End Sub