Results 1 to 13 of 13

Thread: ActiveX component can't create object.

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Posts
    10

    ActiveX component can't create object.

    ActiveX component can't create object.
    Hi guys..
    I have problem with exporting excel file to access..
    it only happens when machine has access 2000, excel 2000.
    with access 97 and 2000 doesn't prodce this problem..
    so i am thinking there's some active X component missing between 97 and 2000...

    my code is

    sungaccess.Docmd.transferspreadsheet acimport, acspreadsheettypeexcel97...etc..

    i don't know where to start to find the problem..
    will you help me please..thanks..

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Guess what?! The office object model changed slightly between 97 and 2000....
    Since it works fine on Access 2000 and not on Access 97, your best bet would be to upgrade...... I know that when I open Access DBs in A2K that were created in A97, it askes me if I want "update" the DB to the "new" format.
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Posts
    10
    thanks techgnome..
    what i am trying to find is what makes that happen..
    what kind of active x component is differ from 2000 and 1997?
    it only happen when i have access 2000..

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Access (and Excel) changed. MS in their infinate wisdom didn't make the two object models (between 97 & 2000) compatible. So an app that works w/ office 2000 isn't going to work w/ office 97. Conversely, stuff that works w/ office 97, isn't going to work with office 2000.
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Posts
    10
    I made application on ms visual basic 6.0

  6. #6
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Unfortunatly, VB isn't the issue: Access 97 & 2000 and Excell 97 & 2000 are. The 2000 object models are incompatible with 97 and if the VB reference is to 2000, it won't run on a machine w/ only 97. The reverse is also true. If t VB references the 97 object model, it isn't going to run on a machine w/ 2000.

    I still think your best bet would be to get all machines up to Access 2000 and Excel 2000.
    But that's just one gnome's opinion.
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  7. #7

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Posts
    10
    any other ideas? or opinion?

  8. #8

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Posts
    10
    bump

  9. #9
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Only two ideas come to mind:
    1) Upgrade so everyone is running the same office version
    2) Use late bound to get the Excel/Access objects.
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  10. #10

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Posts
    10
    sorry i am new to this vb developing...
    what you mean by "Use late bound to get the Excel/Access objects"??

  11. #11
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Instead of
    VB Code:
    1. Dim objExcel As Excel.Application
    2. Set objExcel = New Excel.Application
    where you would have a refrence to the Excel application in your VB app.... remove the reference, then try:
    VB Code:
    1. Dim objExcel As Object
    2. Set objExcel = CreateObject("Excel.Application")
    We've had to do that in several parts of our system due to the Office 97-2K problem.
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  12. #12

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Posts
    10
    techgnome

    Can you explain ..why you remove the reference?..
    little bit more detail??
    thank you so much..

  13. #13

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Posts
    10
    anyone have any explaination on it??

Posting Permissions

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



Click Here to Expand Forum to Full Width