Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I need to delete a file before I start up a macro. I want to just have this
as part of the macro I run. I don't understand how to use the deleteFile method. The file I want to delete is C:\StoreTabFile.XLS. The help screen mentions a FileSystemObject but I do not know what that is. Can someone help me out? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You need to use the kill function...
Kill "C:\StoreTabFile.XLS" -- HTH... Jim Thomlinson "Sarah at DaVita" wrote: I need to delete a file before I start up a macro. I want to just have this as part of the macro I run. I don't understand how to use the deleteFile method. The file I want to delete is C:\StoreTabFile.XLS. The help screen mentions a FileSystemObject but I do not know what that is. Can someone help me out? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
What do I put in there to tell the macro to continue if it cannot find the
file to kill? "Jim Thomlinson" wrote: You need to use the kill function... Kill "C:\StoreTabFile.XLS" -- HTH... Jim Thomlinson "Sarah at DaVita" wrote: I need to delete a file before I start up a macro. I want to just have this as part of the macro I run. I don't understand how to use the deleteFile method. The file I want to delete is C:\StoreTabFile.XLS. The help screen mentions a FileSystemObject but I do not know what that is. Can someone help me out? |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On error resume next
Kill "C:\StoreTabFile.XLS" on error goto 0 -- HTH... Jim Thomlinson "Sarah at DaVita" wrote: What do I put in there to tell the macro to continue if it cannot find the file to kill? "Jim Thomlinson" wrote: You need to use the kill function... Kill "C:\StoreTabFile.XLS" -- HTH... Jim Thomlinson "Sarah at DaVita" wrote: I need to delete a file before I start up a macro. I want to just have this as part of the macro I run. I don't understand how to use the deleteFile method. The file I want to delete is C:\StoreTabFile.XLS. The help screen mentions a FileSystemObject but I do not know what that is. Can someone help me out? |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
THANKS!!!!!
"Jim Thomlinson" wrote: On error resume next Kill "C:\StoreTabFile.XLS" on error goto 0 -- HTH... Jim Thomlinson "Sarah at DaVita" wrote: What do I put in there to tell the macro to continue if it cannot find the file to kill? "Jim Thomlinson" wrote: You need to use the kill function... Kill "C:\StoreTabFile.XLS" -- HTH... Jim Thomlinson "Sarah at DaVita" wrote: I need to delete a file before I start up a macro. I want to just have this as part of the macro I run. I don't understand how to use the deleteFile method. The file I want to delete is C:\StoreTabFile.XLS. The help screen mentions a FileSystemObject but I do not know what that is. Can someone help me out? |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
VB has a Kill command that you should be able to use. Try this line...
Kill "C:\StoreTabFile.XLS" -- Rick (MVP - Excel) "Sarah at DaVita" .(donotspam) wrote in message ... I need to delete a file before I start up a macro. I want to just have this as part of the macro I run. I don't understand how to use the deleteFile method. The file I want to delete is C:\StoreTabFile.XLS. The help screen mentions a FileSystemObject but I do not know what that is. Can someone help me out? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting code from a macro (by a macro) | Excel Discussion (Misc queries) | |||
Deleting a macro | Excel Discussion (Misc queries) | |||
How to stop file open macro prompt after deleting all macros? | Excel Worksheet Functions | |||
Macro is deleting everything! | Excel Discussion (Misc queries) | |||
After deleting a macro, I still get the pop-up when opening file | Excel Worksheet Functions |