Hello all,
I am pulling the data from closed excel file to my current excel with ADO connection string for excels and I use the following statement to open that query. Everything is working perfectly until someone opens the sourced excel file at the background during that pulling process. If someone else open the excel file at the same time, when I run the ADO macro, this source excel from which I pull the data, is starting to be opened firstly in my computer as well and then data is pulled to my own excel. I do not want that source file to be opened in any case. I have tested and see that if the excel file is shared format, despite being opened by someone else it is still not be opened with my ADO macro. But I can not apply this solution to every excel. Because they should not be shared file.
rs.open.query, connection, adOpenKeyset, adLockPessimistic
(I have tried all options above code which are optimistic, readonly and so on - there is no change)
Therefore I am asking here what should I have change in my code if there is a solution for it?
I am pulling the data from closed excel file to my current excel with ADO connection string for excels and I use the following statement to open that query. Everything is working perfectly until someone opens the sourced excel file at the background during that pulling process. If someone else open the excel file at the same time, when I run the ADO macro, this source excel from which I pull the data, is starting to be opened firstly in my computer as well and then data is pulled to my own excel. I do not want that source file to be opened in any case. I have tested and see that if the excel file is shared format, despite being opened by someone else it is still not be opened with my ADO macro. But I can not apply this solution to every excel. Because they should not be shared file.
rs.open.query, connection, adOpenKeyset, adLockPessimistic
(I have tried all options above code which are optimistic, readonly and so on - there is no change)
Therefore I am asking here what should I have change in my code if there is a solution for it?