Delete files with VBA

B

BEEJAY

Have two files that need to be deleted once the Workbook open macro is
(almost) done.
NOTE: These files are in the exact same directory, on each of the computers.

1: File: QCNUM.xls - Regular working file.
Contains Salesmans code number and
Seqential number generator (on hidden
sheet)
2: File: QCNUM_1.xls -is the new file I send out to each salesman
3: File: QCNUM_OLD.xls -to be a "back-up" of QCNUM.xls
4: File: Updater.xls: Strictly a file used to "manipulate the other
files
ONE time use only

Updater Operations:
Take pertinent info from QCNUM and put in identical sheets/cells in QCNUM_1
QCNUM Save as QCNUM_OLD
QCNUM_1 Save As QCNUM

Now I have no need for QCNUM_1 anymore. How can it be deleted?

I also need to get rid of Updater.
BUT, that's the one with the macro in it.
Is the windows temp file always in the same tree? If so, could I rename the
file as Junk.tmp, and have windows delete the file when it closes?
OR .......................??
I want this file deleted, somehow, so it can't be "activated" a 2nd time.

Thanks in advance
 
B

Bob Phillips

Look at Kill in VBA help.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top