Copy & Delete
you need to declare the variable. Also "NewFileName.xls" should be the full
path where you are saving the workbook.
dim NewBook as workbook
Thisworkbook.savecopyas "NewFileName.xls"
Set NewBook=workbooks("NewFileName.xls").open
with newbook
application.displayalerts=false
.sheets("sheetName").delete
application.displayalerts=true
end with
'then your code for e-mailing etc
|