Linking to Excel Help

  • Thread starter Thread starter Scott
  • Start date Start date
S

Scott

I have a table linked to an excel file. When I run an
append query, the data from one table goes to the linked
Excel file. The problem I am having is that if I need to
clear a row or rows in excel, the next time I run the
append query, the data will start in the row following the
cleared data. What I want it to do is if I clear the rows,
have it start in the first row under the header. I
understand if I delete the rows, it will start where I
want it, but then I lose all my formating. Thanks for your
help.
 
Hi Scott,

It looks as if what's happening is that Access is writing to the first
row below the worksheet's UsedRange. When you delete rows or columns
from the worksheet, the UsedRange is adjusted accordingly, but clearing
cell contents doesn't affect it. So perhaps the thing to do is to write
VBA that adjusts the UsedRange after you clear your rows.
 
Back
Top