R
Ray Milhon
The company I work for now has a report they require at various times. The
report involves running several queries in MS Access 2000 and exporting the
results to Excel. Then pulling the data from the spreadsheets that were
created from the export and combining them into 1 worksheet and reformatting
various elements. This is a time-consuming process. I have created a sub
procedure in Access that runs the various queries and pulls the data into
recordsets. I am now trying to export those recordsets into a worksheet
placing the elements where needed and reducing the manual effort. I've done
this before but it's been about 5 years. I can open the spreadsheet but I've
forgotton how to place the elements from the recordsets into the specific
Cells. I thought it was as follows
xlwsh.cells(A1) = "Report Title"
xlwsh.cells(A2) = "Col Header1"
xlwsh.cells(B2) = "Col Header2"
xlwsh.cells(A3) = rs1!field1
xlwsh.cells(B3) = rs2!field1
......
But it's not working. What am I missing??
report involves running several queries in MS Access 2000 and exporting the
results to Excel. Then pulling the data from the spreadsheets that were
created from the export and combining them into 1 worksheet and reformatting
various elements. This is a time-consuming process. I have created a sub
procedure in Access that runs the various queries and pulls the data into
recordsets. I am now trying to export those recordsets into a worksheet
placing the elements where needed and reducing the manual effort. I've done
this before but it's been about 5 years. I can open the spreadsheet but I've
forgotton how to place the elements from the recordsets into the specific
Cells. I thought it was as follows
xlwsh.cells(A1) = "Report Title"
xlwsh.cells(A2) = "Col Header1"
xlwsh.cells(B2) = "Col Header2"
xlwsh.cells(A3) = rs1!field1
xlwsh.cells(B3) = rs2!field1
......
But it's not working. What am I missing??