Results 1 to 4 of 4
  1. #1
    Monterey_Manzer is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2012
    Posts
    164

    ActiveX failure to get Excel object

    Hi Everyone,

    Okay I am having a rather weird and very frustrating problem and I hoping someone else has met with conquered this little beasty. Here's the general situation. I have an Access dBase that is used to house many administrative trackers. These are all replacements of previously used Excel versions and, since other parties with whom we do business are used to those Excel versions, all my reports include an Export to Excel button. This button utilizes the DoCmd.OutputTo command to generate an Excel spreadsheet and then I call one of two Excel formatting macro that I have written (depending on report filtering options). These Excel macros always begin with the same two lines of code as shown below (fName is a passed argument that corresponds to the file name of the Excel file):
    Code:
    Set xl = GetObject(, "Excel.Application")
    Set xlWb = xl.Workbooks(fName)
    Now here's the problem: These two lines of code, along with the rest of the macros, work just fine on my computer. They work just fine on the computer of the head administrator with whom I work to develop Access solutions. However, two of the administrators here receive an error "ActiveX component can't create object". Now we all use identical computers with what should be identical settings so I am at a loss as to how to fix this problem. If anyone has any suggestions I would greatly appreciate it.

    Thanks!


    Ryan

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Maybe their Access install is missing something. Reinstall Access?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    mrojas is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Sep 2013
    Location
    Concord California
    Posts
    72
    I would open the database in one of the computers that do work, switch to design mode (Alt+F11) and from the Tools menu select References.
    Take not of all "checked" references (libraries, etc.)
    Do the same on the computer that generates the error, and compare the references. Most likely you'll find out that you're missing a library; OLE Automation, Microsoft Office xx.x Object Library, Microsoft Excel xx.x Object Library or similar.

  4. #4
    Monterey_Manzer is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2012
    Posts
    164
    Well I took a look at the Access menu options on the machines that didn't work and I think I've found the problem. When I open the Tools menu, the References selection is greyed out and unselectable. Perhaps their install of Access was missing this key part. Unfortunately none of us in the office have administrator privileges on these machines and I will have to push a request for a re-install to the group that manages our computer resources. If that fixes the problem i will mark this thread as solved.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Excel Import Errors-Type Conversion Failure
    By ejm2163 in forum Import/Export Data
    Replies: 5
    Last Post: 04-28-2013, 09:17 PM
  2. Displaying scrollbars in embedded Excel object
    By FelicianoRa@coned.com in forum Forms
    Replies: 1
    Last Post: 01-28-2013, 01:11 PM
  3. Replies: 5
    Last Post: 05-25-2011, 02:34 PM
  4. Replies: 2
    Last Post: 03-03-2011, 12:48 PM
  5. ActiveX componet can't create object
    By quanmay35 in forum Access
    Replies: 1
    Last Post: 05-26-2009, 05:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums