Hi, I need to close my Excel Driver, because I get to the point where 64 are open at once.
How do I do this?
I type the line DDT.CloseDriver (name of XL sheet) into my script but when it gets to that point when I run it, it comes up with an error
'Type mismatch 'DDT.CloseDriver'
I know Im probably being stupid but I've not done this before and help does not really help.
Thanks for your help in advance.
Name should be the name of the driver, right? Not the sheet? Is this the issue? To clarify, you may need file name and sheet here.
Here, editted to insert example from help file:
<font class="small">Code:</font><hr /><pre>
' Creates the driver
' If you connect to an Excel 2007 sheet, use the following method call:
' Set Driver = DDT.ExcelDriver("C:\MyFile.xls", "Sheet1", True)
Set Driver = DDT.ExcelDriver("C:\MyFile.xls", "Sheet1")
' Iterates through records
RecNo = 0
While Not Driver.EOF
Call ProcessData() ' Processes data
Call Driver.Next() ' Goes to the next record
' Closing the driver
Could it maybe be a timing issue also? I don't use DDT, but I do use Excel by opening it as an Excel object from VBScript. If I stop, or it crashes, at a certain point in the process I can sometimes wind up with a couple of the processes lingering, or maybe even a locked file.
9 out of 10 people I prove wrong agree that I'm right. The other person is my wife.