Override dialogue prompt for overwrite during export

  • Thread starter Thread starter Brent E
  • Start date Start date
B

Brent E

Good Morning,

I am using an Access Macro to export files to Excel. I need the VBA code to
do the following:

1. Test to see if the directory is created, if not, create the directory.
Assume path D:\Documents

2. Export data behind the scenes, e.g. Excel as not visible.
Filename is Dyess_Temp.xls.

3. Authomatically overwrite the file if exists, override dialogue box so so
user doesn't get prompted.

Thanks,
 
See:
FileExists() and FolderExists() functions
at:
http://allenbrowne.com/func-11.html

By pasting both functions into a standard module in Access, you can test if
a FolderExists() and MkDir if it doesn't.

You can then test if the FileExists(), and Kill it if it does.
 
Back
Top