Forum Discussion

pmallela2's avatar
pmallela2
Contributor
8 years ago

i am using DDT Driver to get data from Excel driver,but i am facing an issue Vb runtime error unable

i am using DDT Driver to get data from Excel driver,but i am facing an Error : Vb runtime error unable to get data from closed driver.

 

this was happening in one unit.

 

in another unit it was working fine.

 

both are different scripts and different excel files we are using.

2 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    Could you show us the code that is having the issue please?

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Is it possible for you to post the code units that you are working with or at least the related lines?

    Basically, you can open a DDT driver for an Excel file but you need to make sure that you are properly referencing it all around so that you are getting the current driver. You can use the DDT.CurrentDriver property to make sure you are using the latest but the assumption is that there have been no other DDT drivers open prior to you're calling it.

    If you are creating the DDT.ExcelDriver in one unit and trying to use it in another, you need to make sure you use something like that to make sure you are using the correct driver. Also, make sure that you don't close the driver before you are finished using it,

     

    so... without your actual code, that's my best guesses.