alienscript
09-18-2007, 08:06 AM
Hi the gurus,
In my automation task, I was able to check if an XLS file is in use and then alert the users of the username or ID before Exit Sub. I learned it from this page "http://www.xcelfiles.com/IsFileOpenVBA.htm". However, it wasnt successful when my VB procedure using ADO method to run queries and macros in two Access databases and to import correct data back to my worksheet. This was because the user was in use of the databases.
What I want is some similar code that can also check if a mdb database is in use and alert with a msgbox of who the user is (name or ID). This is because the report scheduled to run on a certain time of the day is crucial to decision-making. With username being identified, he/she can be notified to exit the database. Any help is greatly appreciated and thanks very much.
In my automation task, I was able to check if an XLS file is in use and then alert the users of the username or ID before Exit Sub. I learned it from this page "http://www.xcelfiles.com/IsFileOpenVBA.htm". However, it wasnt successful when my VB procedure using ADO method to run queries and macros in two Access databases and to import correct data back to my worksheet. This was because the user was in use of the databases.
What I want is some similar code that can also check if a mdb database is in use and alert with a msgbox of who the user is (name or ID). This is because the report scheduled to run on a certain time of the day is crucial to decision-making. With username being identified, he/she can be notified to exit the database. Any help is greatly appreciated and thanks very much.