View Single Post
  #1   Report Post  
Night Owl
 
Posts: n/a
Default Deleting a file from within Excel

Hi,

I'm importing data from an external *.txt file, but don't want to duplicate
the data by importing the same file twice. When I'm doing it I'll remember
to delete the file after I've imported it, but when someone else does it
they may not.

So my question is this...

The filename and path are stored in the variable myFile - How can I delete
this file as the final step in the macro, without being prompted by a yes/no
option?

As an aside, I also get a prompt when I try to delete a non-active sheet
using code. Can I prevent that, too?

TIA,

Pete