Results 1 to 6 of 6

Thread: Error when using Excel module

  1. #1
    Junior Member
    Join Date
    Jan 2018
    Location
    Surrey, UK
    Posts
    8
    Rep Power
    1

    Error when using Excel module

    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:	17 
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

  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    51
    Posts
    8,311
    Blog Entries
    2
    Rep Power
    10
    Ciao Adam,

    that message box is a debug message box left in the Excel module for an error.
    What version of thinBasic are you using?

    I think 1.9.16.17
    If so, please download thinBasic 1.10.x from here: http://www.thinbasic.com/community/showthread.php?12778

    Let me know
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  3. #3
    Junior Member
    Join Date
    Jan 2018
    Location
    Surrey, UK
    Posts
    8
    Rep Power
    1
    Hi Eros,

    I am using version 1.10.4.0 (sorry meant to put that in my original post).

    Click image for larger version. 

Name:	Thinbasic_Version.JPG 
Views:	14 
Size:	54.3 KB 
ID:	9846


    Adam

  4. #4
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    51
    Posts
    8,311
    Blog Entries
    2
    Rep Power
    10
    Thanks.
    I will check this evening when back from work.
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  5. #5
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    51
    Posts
    8,311
    Blog Entries
    2
    Rep Power
    10
    Can you please download attached thinBasic_Excel.dll module and put it into your \thinBasic\Lib\ path replacing your current one?

    Let me know if it fixes the problem.

    Ciao
    Eros
    Attached Files Attached Files
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  6. #6
    Junior Member
    Join Date
    Jan 2018
    Location
    Surrey, UK
    Posts
    8
    Rep Power
    1
    Hi Eros,

    Yes that seems to have fixed the issue. The sample Excel script now runs successfully.

    I'll have more of a bash next week and let you know if there are any other issues.


    Thanks

    Adam

Similar Threads

  1. parser for the formulas style of excel
    By Edcronos in forum thinBasic General
    Replies: 13
    Last Post: 30-01-2017, 15:39
  2. Excel COM question...
    By Gerald Sutherland in forum COM
    Replies: 77
    Last Post: 20-08-2014, 01:41
  3. Replies: 3
    Last Post: 31-03-2009, 23:16
  4. MS Excel as 3D engine :D
    By ErosOlmi in forum Development
    Replies: 3
    Last Post: 13-03-2008, 01:09
  5. Equivalent VBA Excel code
    By marcel in forum COM
    Replies: 12
    Last Post: 08-11-2007, 16:18

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •