Hi,
I'm using DAO to open an excel file as a database (I know, it can be done much better...) with the OpenDatabase method. The problem is that this method sometimes fails with the error message "Workgroup File is missing or file is opened in exclusive mode by other user". I downloaded a little file-monitoring application and I noticed that indeed the first time the excel file is opened with the opendatabase method the file is locked for a short time and than unlocked again. Probably the error occurs when this lock is still on... Whats the reason of this locking? I open the database in shared mode and readonly, and still I see the lock is placed every first time the DB is opened. Can I prevent this locking operation? To show you where the problem is here is the line where thats fails occasionally:
I hope someone can help me out here...
Thx in advance,
RaKKeR
I'm using DAO to open an excel file as a database (I know, it can be done much better...) with the OpenDatabase method. The problem is that this method sometimes fails with the error message "Workgroup File is missing or file is opened in exclusive mode by other user". I downloaded a little file-monitoring application and I noticed that indeed the first time the excel file is opened with the opendatabase method the file is locked for a short time and than unlocked again. Probably the error occurs when this lock is still on... Whats the reason of this locking? I open the database in shared mode and readonly, and still I see the lock is placed every first time the DB is opened. Can I prevent this locking operation? To show you where the problem is here is the line where thats fails occasionally:
Code:
Set db = DAO.OpenDatabase("C:\Data\FOUTMELDINGEN_EN.xls", False, True, "Excel 8.0")
I hope someone can help me out here...
Thx in advance,
RaKKeR