Hi,

I have been attempting to use the Excel module in ThinBasic but it is throwing a strange error message.

The small program below was written to test the Excel connection.

Uses "Excel"
Uses "Console"
Uses "File"

Dim sXlsFileName As String
Dim xApp As EXCEL_APPLICATION '---This will instantiate the real Excel Application
Dim xWorkBook As EXCEL_WORKBOOK '---An object representing an Excel Workbook (an excel file)
Dim xSheet As EXCEL_WORKSHEET '---An object representing a single Excel worksheet
Dim xRange As EXCEL_RANGE '---An object representing a Range. Will be used to point to different ranges when needed
Dim Filename As String = "c:\ifiles\AVLABL Messages_Apr10.xlsx"
Dim x, y As Long

xApp = New EXCEL_APPLICATION

xApp.Visible = %TRUE

xWorkBook = xApp.WorkBooks.Open(FileName, 2, %FALSE, 5, "")

PrintL "Hello"

xapp.quit


When this is run the pop-up below appears.

Click image for larger version. 

Name:	Excel picture 1.jpg 
Views:	19 
Size:	8.8 KB 
ID:	9843

I click on OK and then I get the error message below.

Click image for larger version. 

Name:	Excel picture 5.jpg 
Views:	18 
Size:	46.1 KB 
ID:	9844

The line it is complaining about is blank (below).

Click image for larger version. 

Name:	Excel picture 6.jpg 
Views:	12 
Size:	12.7 KB 
ID:	9845

I also tried running the sample program Excel_Test.tbasic - this also throws the same error at line 21 after the xApp.Visible = %TRUE command.

Has anyone come across this before?


Thanks

Adam Counsell