Access to Excel - inserting rows (1 Viewer)

The Archn00b

Registered User.
Local time
Today, 13:00
Joined
Jun 26, 2013
Messages
76
Hello everyone,

I'm trying to add two rows to the top of an Excel worksheet "qryCFP" from a workbook using the following vba code from Access:

Code:
Excel.Application.Workbooks("Path").Worksheets.("Sheet1").Rows.Insert

I get the error message "subscript out of range."

I realize that the code above will only add one row, but I was going to include it twice in the subroutine. Is there anyone that can help with this error? It seems like it shouldn't be that difficult to accomplish, but I'm new to using Excel through access.

Thank you!
 

Users who are viewing this thread

Top Bottom