Deleting files in a macro

S

Stuart

I have created a spreadsheet which collects and summarises
data from other temporary spreadsheets, which are output
from an Access application.

My macro then copies and pastes the collected data as
values. I would then like to delete the temporary files. I
think I oughtto be able to do this from within the macro.

Can anyone help?

Stuart

PS Is it possible to save the collection spreadsheet with a
date based name, created by the macro itself. For example
"yymmdd.xls"
 
D

Dave Peterson

look at Kill in VBA's help.

activeworkbook.saveas filename:="c:\whereever\whatever you want" & _
format(date,"yyyymmdd") & ".xls"

along with all the other parms you need.

(I like 4 digit dates!)
 
Top