Deleting rows from an excel file
Hi,
was hoping someone could help me with my project. Im trying to delete a specific number of rows from an excel file using:
Counter = num_of_lines_read
Do While (Counter > 0) And (Counter = num_of_lines_read)
xlBook.Worksheets("Sheet").Row(1).delete
Loop
basically if i have read up to 8 lines i want to delete these lines. Problem is i keep gettin up an error for the line
xlBook.Worksheets("Sheet").Row(1).delete
can anyone tell me whats wrong, if anything with that line?
the error i get is error 9 subscript out of range.