Macro Question - Set Warnings (1 Viewer)

durdle17

Registered User.
Local time
Today, 18:08
Joined
Feb 21, 2003
Messages
28
Hi,

I have a macro setup that exports excel files to a network path. Each day when I run the macro its asks me to over-write the previous days file, I was wondering is there a way to prevent this prompt from appearing.

Thanks
Chris
 

ColinEssex

Old registered user
Local time
Today, 18:08
Joined
Feb 22, 2002
Messages
9,116
Check out the "kill" statement in Access help.

Col
:cool:
 

durdle17

Registered User.
Local time
Today, 18:08
Joined
Feb 21, 2003
Messages
28
Hey,

The kill statement looks good but my command button is based on a Macro, so I am unsure on how and where to actually write the code?

chris
 

ColinEssex

Old registered user
Local time
Today, 18:08
Joined
Feb 22, 2002
Messages
9,116
Write the Kill statement in a function and call it first in the macro - then export the file.

Col
:cool:
 

durdle17

Registered User.
Local time
Today, 18:08
Joined
Feb 21, 2003
Messages
28
hey colin,

I don't want to sound stupid, but how do you write the function, is it a module?
if yes, would you write the code in a module and then in the macro use the "OpenModule" option?

chris
 

Mile-O

Back once again...
Local time
Today, 18:08
Joined
Dec 10, 2002
Messages
11,316
You would write the function in a module.

To run it with a macro you would use the RunCode command.

And in the "code to run" box you call the function by name while also passing parameters (if any)

i.e

Code to run: FindBirthday(dteDateOfBirth)

where FindBirthday is the function name and dtDateOfBirth is an variable we are sending to it for the function's use.
 

Users who are viewing this thread

Top Bottom