Deleting Files Using Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have: an obsolete Excel file.

I want: to delete the file (using code in my Access database). The file name
is known, so there is no need to use a file browser.

Any suggestions?
 
Thanks, Doug! Worked like a charm!






- Show quoted text -

I am trying to use the Kill statement myself and keeping getting
errors. When I create the Macro what actio item do I choose from the
drop-down menu and then what would the verbiage be in the dialog box.
I am using Access 2003.

Thank you.
 
I am trying to use the Kill statement and do not know exactly where to put it
at. Not sure if this is something I use in the Macro or in the Module
section. And if so, the verbiage I need to use to execute the command.

Thanks.
 
Kill is a VBA command, so you'd use it in a module, not a macro. To be
honest, I never use macros, but I don't think it's possible to do using a
macro.

What I gave is a complete example: it's simply the word Kill, followed by a
space, followed by a string that contains the full path to the file (either
a literal string, such as in my example, or a string variable that contains
the information, or some combination thereof, such as strPath & "file.txt")
 
Doug,

I have followed your example and have the "kill" statement in the Module but
I can't figure out how to execute it.

What am I missing?

Thanks.
 
What event is supposed to trigger the code being run?

Presumably you put the code in a Function or Sub: just call that routine in
whatever event's supposed to trigger it.
 
Back
Top