Linking to Excel Help

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.
 
J

John Nurick

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top