Forum Discussion
I am closing driver after opening each time using below code
Call DDT.CloseDriver(DDT.CurrentDriver.Name)
Same code was running fine last week . Now also it is running fine on few machines on few machine it creating this issue.
I read on community if you keep open the excel file which is used then it will be fine and it works for me but I really don't understand why it is happening and it is also not a good idea to open excel sheets if you are using multiple datasheets.
I also read downloading Microsoft Access database Engine 2010 might resolve problem that doesn't work for me.
The Excel file is stored on C drive . Does it make difference?
One of the pitfalls of using "CurrentDriver.Name" is that it is possible that the "currentdriver" in use when you go to close the driver may NOT be the one you actually want to close. I prefer, when using DDT drivers, to actually assign the driver object to a variable that I then call the name property on whenever possible... that way I KNOW what driver I'm closing and not depending upon making sure that "CurrentDriver" is the desired driver.
What it sounds like is a possibility is that you MAY be closing the driver when you don't mean to
Another thing... using a DDT.ExcelDriver, there's a third property for the ACE driver. I would recommend setting that to "true" as that might help with some of the problems you may be dealing with.