Hi all, I am hoping this is a simple fix.
I used some vb code to kick out data to my excel file. Basically each time the code is run, the new data overwrites the previous data on the excel sheet.
This works, it overwrites, BUT it doesn't clear out the previous information.
So say I ran it yesterday and there were 50 rows kicked out.
Then today I ran it again and there were only 10 rows kicked out.
My excel sheet overwrites the first 10 rows, but leaves the other 40.
Is there a way to make this clear out the whole page, then write the new data? I pretty much used the code from this site.
"https://btabdevelopment.com/export-a-table-or-query-to-excel-specific-worksheet-on-specific-workbook/"]https://btabdevelopment.com/export-a-table-or-query-to-excel-specific-worksheet-on-specific-workbook/"
I've also attached my code. Any ideas would be great. Thanks so much!
Marie
I used some vb code to kick out data to my excel file. Basically each time the code is run, the new data overwrites the previous data on the excel sheet.
This works, it overwrites, BUT it doesn't clear out the previous information.
So say I ran it yesterday and there were 50 rows kicked out.
Then today I ran it again and there were only 10 rows kicked out.
My excel sheet overwrites the first 10 rows, but leaves the other 40.
Is there a way to make this clear out the whole page, then write the new data? I pretty much used the code from this site.
"https://btabdevelopment.com/export-a-table-or-query-to-excel-specific-worksheet-on-specific-workbook/"]https://btabdevelopment.com/export-a-table-or-query-to-excel-specific-worksheet-on-specific-workbook/"
I've also attached my code. Any ideas would be great. Thanks so much!
Marie