Export to Excel prompts

J

J Shrimps, Jr.

I have 30 or more queries that
have to be exported every month.
Since the data in the underlying
tables is new, I want to overwrite
last month's queries.
I can easily create a macro that
exports all the queries to the
same folder every time,
but I am prompted with the
"X:\Data\Spreadsheets\Region1\YadaYada.xls
already exits. Do you want to overwrite?"

Yes, in fact I do, AND STOP ASKING ME!!!
Is there a way to turn this message off?
 
K

Ken Snell [MVP]

Not via a macro, no. You would need to use VBA code to delete the current
file so that the export won't find the file already exists.
 
J

J Shrimps, Jr.

Thought so.
Thanks.

Ken Snell said:
Not via a macro, no. You would need to use VBA code to delete the current
file so that the export won't find the file already exists.
 
T

Tom Lake

Ken Snell said:
Not via a macro, no. You would need to use VBA code to delete the current
file so that the export won't find the file already exists.

Wouldn't SetWarnings False do it?

Tom Lake
 
S

Steve Schapel

No, Tom, unfortunately SetWarnings only applies to the Access system
messages, such as action query confirmation prompts.
 
C

Chris Reveille

Steve, How about exporting to an excel file naming the
sheet. You are not prompted and the sheet is overwritten.

Chris
 
K

Ken Snell [MVP]

You are correct that this does not ask about overwriting the sheet (and thus
the file). However, using the Range argument in an export is not a
documented feature for ACCESS, so one runs the risk that it won't work in
future updates or versions.
 

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