TechInNeed
IS-IT--Management
Having a problem here.
Is there a way to overwrite an excel file completely with access vba coding?
Basically my program behaves like this. When I click on a "Print" cmd button it outputs the search criteria data from an access DB that the user specifies, and stores the data in an *.xls file. Let's just say that 10 rows of data was output to a file called test.xls. Now when the user searches more data and outputs it to the same file with let's say 3 records. It will overwrite the first 3 records that already exists, but leaves the other records in the file. I want to be able to overwrite the entire file so that when the user outputs the 3 rows in that same file, then the other records are also overwritten with blank lines.
I'm thinking of either deleting all contents from the *.xls file and then populating the output OR deleting the *.xls file, creating it again, and then output the data.
Please comment.
All help is appreciated.
Thanks
Is there a way to overwrite an excel file completely with access vba coding?
Basically my program behaves like this. When I click on a "Print" cmd button it outputs the search criteria data from an access DB that the user specifies, and stores the data in an *.xls file. Let's just say that 10 rows of data was output to a file called test.xls. Now when the user searches more data and outputs it to the same file with let's say 3 records. It will overwrite the first 3 records that already exists, but leaves the other records in the file. I want to be able to overwrite the entire file so that when the user outputs the 3 rows in that same file, then the other records are also overwritten with blank lines.
I'm thinking of either deleting all contents from the *.xls file and then populating the output OR deleting the *.xls file, creating it again, and then output the data.
Please comment.
All help is appreciated.
Thanks