Click to See Complete Forum and Search --> : I want to delete a workbook using code
writelearner
Sep 9th, 2004, 08:44 AM
is it possible
thanks anyway
Ecniv
Sep 9th, 2004, 09:00 AM
Yes.
Kill "<filepath" <<< Deletes the file
To delete a worksheet (outside excel vb/vba)
<object refering to excel application>.<workbook>.sheets("<sheetname").delete
Inside excel vba
activesheet.delete
or
activeworkbook.sheets("<sheet name>").delete
Try one of those :)
Vince
writelearner
Sep 10th, 2004, 03:40 AM
lets kill them all
thanks a lot
er maybe you know how to create a folder too :wave:
Ecniv
Sep 10th, 2004, 06:41 AM
mkdir - make directory/folder
rmdir - remove folder
open - open a file or create one
close - close the channel of an open file
kill - delete file (not put in wastebasket!! - look up api to put in wastebasket)
print - prints a string to a file
line input - inputs a line from an open file
get - get byte(s) from a file
put - put byte(s) into a file
You'll have to search the help files for proper usage.
Make sure you back up everything.
Vince
writelearner
Sep 13th, 2004, 01:45 AM
thanks a lot. it will be usefull
writelearner
Sep 16th, 2004, 01:35 AM
thanks a again
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.