MOD2000: Cannot Open Code Librarian If Remote Library Is Not Available

ID: Q236482


The information in this article applies to:
  • Microsoft Office 2000 Developer

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.

SYMPTOMS

You cannot open Code Librarian, and, after some time, you may receive the following error message:

Run-time error '52':

Bad file name or number
On a computer running Windows 95 and 98, if you try to run Code Librarian repeatedly, Windows Explorer may stop responding.


CAUSE

Code Librarian always tries to open the last code library file that you opened. When you last ran Code Librarian, you opened a code library file located on a remote computer on your network. The remote computer is now unavailable on the network.


RESOLUTION

To enable Code Librarian to open again, do one of the following.

Make the Other Computer Available

Bring the computer on which the code library is located back online. Even if the code library is no longer on the remote computer, bringing the computer back online allows Code Librarian to open. At that point, you can reset Code Librarian by opening a local code library, such as the one included with Code Librarian.

Reset DBLocation DWORD in the Registry

WARNING: 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 you cannot make the computer available on the network, you can delete the registry DWORD that holds the file path. To do this, follow these steps:
  1. Click Start, and then click Run.


  2. In the Run box, type regedit, and then click OK.


  3. In Registry Editor, browse to the following key:


  4. 
       HKEY_CURRENT_USER
          \Software
             \VB and VBA Program Settings
                \CodeLibrarian
                   \Settings 
  5. In the right pane, click DBLocation, and then press DELETE. When asked if you are sure, click OK.


After doing this, the next time that you open Code Librarian, Code Librarian has no database open. You can then open another code library, such as the one provided by Microsoft Office 2000 Developer.


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

The default location of the code library file that is included with Code Librarian is the following:


   \Program Files\Microsoft Office\ODETools\V9\Codelib.mdb 

Steps to Reproduce Behavior

  1. Open Code Librarian.


  2. On the File menu, click New.


  3. Browse to a share on another computer that you have rights to.


  4. After you are at the share, in the File Name box, type test, and then click Open. A new database named Test is created on the other computer.


  5. Close Code Librarian, and then reopen it. Note that the library file created earlier is opened automatically. Close Code Librarian again.


  6. Shut down the other computer where the new Test library was saved. Do not start it back up.


  7. On the first computer, try to reopen Code Librarian. It appears that nothing is happening. If you try again, you may receive a message similar to the following:
    This action cannot be completed because the
    CodeLibrarian application (CodeLibrarian) is not
    responding. Choose Switch To to activate
    CodeLibrarian and correct the problem.
    If you click Switch To, you receive the error message described in the "Symptoms" section of this article. If you restart the second computer, you are able to open Code Librarian.


Additional query words: pra machine pc

Keywords : kbdta modCodeLib
Version : :
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: December 14, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.