P
Pendragon
Access03/WinXP
Running code to dump data from a recordset into an Excel file. I am trying
to populate the first row with the recordset field names. The problem is in
trying to move from one column to the next - the error is "438 - Object
doesn't support this property or method."
Any help is appreciated.
Set objActiveWkbk = objExcel.workbooks.Add
......
rs.MoveFirst
With objExcel
.Sheets(1).Select
With .ActiveSheet
For i = 1 To rs.RecordCount
.cells(1, i).Select ***Error is here***
.ActiveCell.Value = rs(i).Name
.ActiveCell.Font.Bold = True
Next i
.Range("A2").CopyFromRecordset rs
End With
End With
Thanks!
Running code to dump data from a recordset into an Excel file. I am trying
to populate the first row with the recordset field names. The problem is in
trying to move from one column to the next - the error is "438 - Object
doesn't support this property or method."
Any help is appreciated.
Set objActiveWkbk = objExcel.workbooks.Add
......
rs.MoveFirst
With objExcel
.Sheets(1).Select
With .ActiveSheet
For i = 1 To rs.RecordCount
.cells(1, i).Select ***Error is here***
.ActiveCell.Value = rs(i).Name
.ActiveCell.Font.Bold = True
Next i
.Range("A2").CopyFromRecordset rs
End With
End With
Thanks!