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



The information in this article applies to:

  • Microsoft Office 2000 Developer

This article was previously published under Q236482
IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry

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: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

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:
       HKEY_CURRENT_USER
          \Software
             \VB and VBA Program Settings
                \CodeLibrarian
                   \Settings
    					
  4. 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 that this is a bug in the Microsoft products that are 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.

Modification Type:MajorLast Reviewed:6/11/2002
Keywords:kbbug kbCodeLibrarian KB236482