-
I have a small executable which uses an excel file as a source for data. The program is such that several instances of it might need to be open at once. But when I open a second instance, I get:"the microsoft jet database engine cannot open ..the excel file..It is already open exclusively or you need permission."
So can anyone tell me how to make the excel file readable by many instances at once?
Thanks!
-
Maybe you can link your Excel sheet through MS Access, and have your clients access the MS Access database instead....?
-
Thanks, but the aim is to keep the overhead of new programs low - users won't have msaccess
-
If you need read/write permissions, it appears that you are S.O.L
If you need read only access, you are OK
This is ADO code
Code:
Dim cn As Connection
Set cn = New Connection
cn.Mode = adModeRead
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=sample.xls;Extended Properties=Excel 8.0"
-
Thanks Clunietp! I set the data1 object to read only and it works fine. Nice to have the code to do it as well :)