05-04-2005, 02:34 PM
I think, to archive the data to another file, macro at first should save the current file and then copy the saved file to another file.
str sf sf2
;assume, current file is Book1.xls on the desktop
sf.expandpath("$desktop$\Book1.xls")
act "Excel"
;save and wait for CPU idle
key Cs ;;assume, it is already saved once, and Save As dialog will not appear
10 P
;copy with unique file name
sf2=sf
UniqueFileName sf2
cop sf sf2
;select all and delete
key Ca X