I need to write a series of values to a Excel worksheet. The problem that I am having is how to refer to the cells where I want to write the data. I want to start on page PC in column 10 (K) row 2 and write to successive rows.
Here is what I have so far:
Set Db = DBEngine(0).OpenDatabase(App.Path & "\" & "O_Rate.xls", False,
False, "Excel 8.0; HDR=1")
Set Rs = Db.OpenRecordset("PC$")
If Rs.RecordCount > 0 Then
Rs.MoveLast 'size the array
Debug.Print Rs(0) 'this works, I get the
correct value for A,2
For i = 1 To 33
Debug.Print i; " * "; lngAVinTotal(i)
![K,1+i] = lngAVinTotal(i) 'this is the problem, how
do I refer to the cell?
I get a Run-time error '3265' Item not found in this collection.