Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2006
    New Kensington, PA

    Unanswered: Run time error 3170 (Couldn't find installable ISAM

    I am trying to connect VB 6.0 to Excel 2003 and ran code that reads:
    regvsr32 /u/s/n/i:cmdline msexch35.dll
    (I got this off the Microsoft website.)

    1. I can't find msexch35.dll on my system
    2. system is up to date on SP2
    - Windows XP 2003
    - Visual Basic Professional 6.0
    - Excel 2003
    3. It's been a couple of years since I coded in VB
    4. I need to be able to shift data in and out of Excel and do complex slope calculations that will be active in VB when user choses to do so.

    Any Suggestions? Is there a better way of connecting to Excel.

  2. #2
    Join Date
    May 2003
    Atlanta, GA
    I am not sure how you are running that code in VB as it seems to be just code to register and unregister the DLL from the registry.
    Here is some code to use Excel worksheets:
    'Add Microsoft DAO or ADO Reference from Project_References
    ''Change 8.0 to 5.0 below if you are using previous version of Excel 2000 or to 9.0 for 2003 I think.
    I am using DAO for this example.

    Sub OpenXLS()
    Dim dbmain As Database
    Dim rcset As Recordset
    Set dbmain = OpenDatabase("c:\somewhere\book1.xls", False, False, "Excel 8.0;")
    Set rcset = dbmain.OpenRecordset("Sheet1$") '$ should be added into the table name
    MsgBox rcset.RecordCount
    'Now you have the excel file as database. You can manage it.

    Set rcset = Nothing
    Set dbmain = Nothing
    End Sub

    You can also try using excel library to open and manage excel file and also OLE object to do that.
    Hope this helps.

  3. #3
    Join Date
    May 2003
    Atlanta, GA
    Here is an great tutorial on how to use Excel in VB.

Posting Permissions

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