I need some input from you smart folks. I am populating an excel spreadsheet. Each time, I want to clear the spreadsheet content before repopulating it. I am using the codes below and it is clearing the first 3 rows in the spreadsheet and every other data stays in tact.
This is is my code:
u can clear the entire content.. but easy way round is to: First have a Blank File which is properly formatted, and When u want to create one, Copy the BlankFile to new Filename and modify it. Next when u want o create one more, Create with a new name or Kill previos file and copy to same name. Check This:
Say ur File Name is "C:\Myxl.xls"
If Dir("C:\myxlnew.xls",VbDirectory) <> "" Then