Article ID: 163475 - View products that this article applies to.
This article was previously published under Q163475
IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.
When you run a Visual Basic for Applications macro that uses Data Access Object, you may receive the following error message:
Run-time Error '424':
This problem may occur when either of the following is true:
To resolve this problem, use the following appropriate method.
Method 1: Data Access Object Library Is Not RegisteredWARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.
For information about how to edit the registry, view the "Changing Keys And Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD).
If the Data Access Object library is not properly referenced, follow these steps to create a reference to the library:
Microsoft Excel 97:
Also, if you reference the Microsoft Access Object Library, it must be referenced BEFORE the Microsoft Data Access Object Library. To change the order in which libraries are referenced in Microsoft Excel 97, select the appropriate library in the References dialog box. Then, use the Priority buttons to move the references up and down in the list as required. When you are done, click OK.
In Microsoft Excel 7.0, if the Microsoft Data Access Object Library is referenced BEFORE the Microsoft Access Object Library, click the Microsoft Data Access Object Library to remove the check mark from the check box and Click OK. From the Tools menu, click Reference and select the Microsoft Data Access Object Library check box to reselect this option. Click OK. This places the Microsoft Data Access Object Library reference after the Microsoft Access Object Library in the reference list.
Method 2: Data Access Object Files are Missing, Damaged, or UnregisteredMicrosoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. Testing the Data Access Object Engine:
Before you proceed with the steps to replace the Data Access Object files, test the Data Access Object engine with a macro to ensure that it is working. To do this, type the following macro in a new module, and then run the macro:
If the macro returns an error message, and you already referenced the Data Access Object library, you must reinstall the Data Access Object engine by removing and then reinstalling it. If you installed Data Access Object multiple times, (this can occur when you install multiple programs), you must edit the registry so that the Data Access Object components are removed when you remove Microsoft Office. To edit the registry, use the following steps:
For additional information, please see the following article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/178400/EN-US/ )OFF97: Installing Win 95 to New Folder to Tshoot Office Problems
Article ID: 163475 - Last Review: October 11, 2006 - Revision: 2.3