Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run a Macro once a day

Status
Not open for further replies.

Elamranii

MIS
Feb 1, 2005
57
US
Hi all,
I need a user to run a macro no more than once a day. if the use try to run the macro the second time, a message box pops up telling the user that he/she already ran the macro once.
How do I do this?
Thanks
Ismail
 
You will have to create a table with dates in it. Append todays date each time the macro is run. Have the macro check to see if todays date is in the table before it processes.

ChaZ

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.

 
What if the user closes the database, then later in the day reopens the database and runs the macro again? Is this also an issue that you need to trap?
 
if the user closes the database and reopens it he/she still shouldn't be able to run the macro again. the purpose of this is to run it once a day.
Thanks
 
In which case I think Blorf has the most straightforward solution for you. If multiple users can each legitimately run the macro once a day from their own machines, then I would add some user identification to the controlling table.
 
You're right, I just tried Blorf solution and it worked. Thank you all for your help.
Ismail
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top