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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autoexecute Macro - With Security

Status
Not open for further replies.

bkf7911

MIS
Mar 20, 2007
83
US
I have a macro that needs to be ran on a daily basis, that cannot be ran by the read-only users in the database. How can I set the macro to run either

a) when a specific user (not read-only) enters the database with her ID and password.

or

b) at a certain time of the day?

Any help is greatly appreciated.
 

a] On the start up form, check if CurrentUser matches with your desired userID that should run the macro and run it!

b] Create a non visible form and add a timer for checking the current time. Load it at start up. If Time() falls between the time span of the day you like, run your macro.
 
A is the best solution for me, i think. Setting the conditions of the macro so it runs if the CurrentUser() is equal to the ID of the person I want to be able to run it. Thanks much!@@
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top