A
Annette
I am using the VBA code(below) to add data from a query to an excel
worksheet. The code works perfect except it starts adding records
beginning at my chosen cell A2 and continues to the end of the excel
file. I have an excel file that has a header row and a trailer row, so
all of the data from the access query needs to start at row 3 and be
INSERTED to the file.
For example -- manually -- I can copy the rows and open another excel
worksheet and INSERT COPIED CELLS and the data would insert in the
space I wanted and move everything else down.
How can I do that in VBA -- keeping in mind that I don't want to
fiddle with row 1 information or row 3 information -- just insert
beginning in row 2 retaining my row 3 trailer information (which will
now be moved to the end of the file -- so if I inserted 10 rows, the
trailer record would move down to be at row 12?
http://www.accessmvp.com/KDSnell/EXCEL_Export.htm
worksheet. The code works perfect except it starts adding records
beginning at my chosen cell A2 and continues to the end of the excel
file. I have an excel file that has a header row and a trailer row, so
all of the data from the access query needs to start at row 3 and be
INSERTED to the file.
For example -- manually -- I can copy the rows and open another excel
worksheet and INSERT COPIED CELLS and the data would insert in the
space I wanted and move everything else down.
How can I do that in VBA -- keeping in mind that I don't want to
fiddle with row 1 information or row 3 information -- just insert
beginning in row 2 retaining my row 3 trailer information (which will
now be moved to the end of the file -- so if I inserted 10 rows, the
trailer record would move down to be at row 12?
http://www.accessmvp.com/KDSnell/EXCEL_Export.htm