Override dialogue prompt for overwrite during export

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,
 
A

Allen Browne

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top