Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Excel
#1
Does anyone know how to create a macro that
1. Archives the data from a particular worksheet to another file
2. Clears the data out of the sheet when done?

If you could help I would be most greatful.

Have this school project and trying to Jazz it up a bit.[/list]
#2
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.

Code:
Copy      Help
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


Forum Jump:


Users browsing this thread: 1 Guest(s)