Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/169379

From BetaArchive Wiki

Article ID: 169379

Article Last Modified on 9/26/2003



APPLIES TO

  • Microsoft Project 4.1 Standard Edition
  • Microsoft Project 4.1a



This article was previously published under Q169379

SYMPTOMS

When you run a Visual Basic for Applications macro that uses a Data Access Object, you receive the following error message:

Run-time Error '424': Object Required

CAUSE

This problem occurs when either of the following is true:

  • The Data Access Object library is not properly referenced. -or-


  • The Data Access Object files are missing, damaged, or improperly registered.

NOTE: This problem also occurs if you are running Windows NT 4.0, and the Microsoft Access Object Library is not referenced before the Data Access Object Library.

WORKAROUND

To resolve this problem, use the appropriate method.

Method 1: Data Access Object Library Not Registered

If the Data Access Object library is not properly referenced, follow these steps to create a reference to the library:

  1. On the View menu, point to More Views.
  2. In the More Views dialog box, click Module Editor, and then click Apply.
  3. On the Tools menu, click References.
  4. In the References dialog box, under Available References, click to select the "Microsoft DAO 3.0 Object Library" check box, and then click OK.


If the "Microsoft DAO 3.0 Object Library" option is not listed in the Available References list, click Browse and find the Dao3032.dll file. This file is located in the following folder:

Program Files\Common Files\Microsoft Shared\Dao

Click the file and then click OK.

  1. In the References dialog box, click OK.

NOTE: If you are using Windows NT 4.0, you also need to create a reference to the Microsoft Access Object Library. To do this, use the preceding steps.

Also, if you reference the Microsoft Access Object Library, it must be referenced BEFORE the Microsoft Data Access Object Library.

If the Microsoft Data Access Object Library is referenced BEFORE the "Microsoft Access Object Library", do the following:

  1. On the Tools menu, click References.
  2. Click to clear the "Microsoft Data Access Object Library" check box and click OK.
  3. On the Tools menu, click References.
  4. Click to select the "Microsoft Data Access Object Library" check box.
  5. Click OK.


This places the "Microsoft Data Access Object Library" reference after the "Microsoft Access Object Library" in the reference list.

Method 2: Missing, Damaged, or Unregistered Data Access Object Files

Microsoft provides examples of Visual Basic for Applications procedures for illustration only, without warranty either expressed or implied, including, but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. The Visual Basic procedures in this article are provided 'as is' and Microsoft does not guarantee that they can be used in all situations. While Microsoft support engineers can help explain the functionality of a particular macro, they will not modify these examples to provide added functionality, nor will they help you construct macros to meet your specific needs. If you have limited programming experience, you may want to consult one of the Microsoft Solution Providers. Solution Providers offer a wide range of fee-based services, including creating custom macros. For more information about Microsoft Solution Providers, call Microsoft Customer Information Service at (800) 426- 9400.

Before you 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:

   Sub DAO_Test()
      MsgBox DBEngine.Version
   End Sub
                    

If the macro returns an error message, and you already referenced the Data Access Object library, reinstall the Data Access Object engine by removing and then reinstalling it.

If you continue to receive the error message described in the "Symptoms" section of this article, continue use the following steps to troubleshoot this problem:

  1. Open the file in Microsoft Project.
  2. On the View menu, point to More Views.
  3. In the More Views dialog box, click Module Editor, and then click Apply.
  4. On the Tools menu, click References.
  5. Clear any references to the Data Access Object libraries. Click OK.
  6. On the File menu, click Save.
  7. On the File menu, click Exit.
  8. Restart Microsoft Project and open the file.


You can now reference the Data Access Object library you want to use.

If the problem continues after you follow the preceding steps, reinstall Microsoft Windows 95. For additional information, please see the following article in the Microsoft Knowledge Base:

142096 How to Reinstall Windows 95 to a New Folder


Keywords: kbmacro KB169379