Run a macro on a specific date - JCW

J

JohnW

I have a macro set up that runs a MsgBox that I need to run on some specific
dates at the end of the month. I would like to run the macro on the 24th,
25th, 26th, and 27th of each month.

Any suggestions on how to do this? Thanks
 
J

John W. Vinson

I have a macro set up that runs a MsgBox that I need to run on some specific
dates at the end of the month. I would like to run the macro on the 24th,
25th, 26th, and 27th of each month.

Any suggestions on how to do this? Thanks

Use Window Scheduler to launch Access, using the

/x Macroname

command line switch.
 
J

John Spencer

More details might help.

Do you want to run the macro whenever the database is opened on those dates?
Do you want to run the macro independently of the database being opened?
Are you allowed to use VBA functions in your database?
What version of Access are you using?

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 
J

JohnW

John S.

We need the macro to run when they have the database open on those days; it
is a reminder message on something they should be doing at the end of the
month. We are using Access 2003. I am not sure about VBA functions being
"allowed". I have used some VB coding in the program but I am certainly not
good with and don't always understand some of the coding that you guys have
suggested for me even when it works.

Hope this helps. Thanks.
 
J

JohnW

John S.

We need the macro to run when they have the database open on those days; it
is a reminder message on something they should be doing at the end of the
month. We are using Access 2003. I am not sure about VBA functions being
"allowed". I have used some VB coding in the program but I am certainly not
good with and don't always understand some of the coding that you guys have
suggested for me even when it works.

Hope this helps. Thanks.
 
J

John Spencer

One way to do what you want is to use an AUTOEXEC macro.

Create a new macro
== Enter SendMessage as Macro Name
== Enter a condition of
Day(Date()) In (24,25,26,27)
== Enter MsgBox as the Action
== At the bottom enter the action arguments - your choice here.
== Save the Macro as AutoExec

Now whenever the database is opened on the specified dates the message will
pop up.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 
J

JohnW

Thanks John, this worked great.
--
JCW


John Spencer said:
One way to do what you want is to use an AUTOEXEC macro.

Create a new macro
== Enter SendMessage as Macro Name
== Enter a condition of
Day(Date()) In (24,25,26,27)
== Enter MsgBox as the Action
== At the bottom enter the action arguments - your choice here.
== Save the Macro as AutoExec

Now whenever the database is opened on the specified dates the message will
pop up.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

.
 

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