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
    7

    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.

    Excel picture 1.jpg

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

    Excel picture 5.jpg

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

    Excel picture 6.jpg

    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
    57
    Posts
    8,777
    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/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

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

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

    Thinbasic_Version.JPG


    Adam

  4. #4
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Thanks.
    I will check this evening when back from work.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  5. #5
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    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/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  6. #6
    Junior Member
    Join Date
    Jan 2018
    Location
    Surrey, UK
    Posts
    8
    Rep Power
    7
    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

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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