Showing posts with label Runtime Error. Show all posts
Showing posts with label Runtime Error. Show all posts

"ActiveX component can't create object" Runtime Error in Visual Basic Application

This behavior can occur if any of the following conditions are true:

  • Data Access Objects (DAO) is not properly registered.
  • One or more references are missing.
  • There is a utility database reference that is not valid.
  • You do not have the required permissions for required libraries.
  • There is a damaged wizard file.

Cause 1: DAO is not properly registered
1. On the computer that hosts Microsoft Windows Terminal Server or the computer on which Microsoft Access is installed, click Start, and then click Run.
2. Type regsvr32 followed by the path to your DAO file. Enclose this path in quotation marks. For example, to register the DAO 3.6 library, use the following command regsvr32 "C:\Program Files\Common Files\Microsoft Shared\DAO\DAO360.DLL"

Cause 2: One or more references are missing
1. Open the database for which you receive the error message.
2. Press ALT+F11 to open the Microsoft Visual Basic Editor.
3. In the Visual Basic Editor, click References on the Tools menu.
4. Examine the list of libraries. If any items are marked as "missing," locate the library file and re-associate the reference. Or, click to clear the check box next to the library name.

Cause 3: There is a utility database reference that is not valid
1. Open the database for which you receive the error message.2. Press ALT+F11 to open the Visual Basic Editor.
3. In the Visual Basic Editor, click References on the Tools menu.
4. Click to clear the check box next to any reference to Utility Database or Utility.

Cause 4: You do not have the required permissions for required libraries
Make sure that users have "read" permissions for all files in the following folders as per Operating System Location:

  • Windows XP \Windows\System32
  • Windows NT and Windows 2000 \Winnt\System32
  • Windows 95, Windows 98, and Windows Millennium Edition \Windows\System

If you cannot grant read permissions, you can use a utility such as FileMon to determine which file or files the users do not have the required permissions to use. To obtain FileMon, visit the following Sysinternals Web site: Sysinternals

Cause 5: There is a damaged wizard file
1. Use Windows Explorer to locate the following wizard files: Acwzmain.mde, Acwztool.mde and Acwzlib.mde.
2. Change the file name extension of each file to "old." For example, change Acwzmain.mde to Acwzmain.old.
3. Reinstall Access to restore the files.