XL: Determining Which DLLs Are Registered

ID: Q108002

The information in this article applies to:

SUMMARY

In Microsoft Excel, to determine which DLLs are registered, you can do either of the following:

Using Microsoft System Info to Display a List of Registered DLLs

1. On the Help menu, click About Microsoft Excel.

2. Click System Info.

3. In the list of categories, click System DLLs.

The Microsoft System Info dialog box displays a list of all registered DLLs, indicating the DLL file name, version, date, size in bytes, and displays the word "Yes" next to each DLL that is currently in memory.

Using a Visual Basic Procedure

Microsoft provides programming examples 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. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft Support professionals 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 needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:

   http://www.microsoft.com/support/supportnet/refguide/

You can use the RegisteredFunctions property to return an array of every Microsoft Excel function that is provided by DLLs and other code resources, along with the name of the associated file.

The following sample macro creates a three-column array of all registered functions in Microsoft Excel, where column 1 displays the name of the DLL or code resource; column 2 displays the name of the procedure in the DLL or code resource; and column 3 displays strings specifying the data types of the return values, and the number and data types of the arguments:

Sub GenerateDLLList()
   theArray = Application.RegisteredFunctions
      If IsNull(theArray) Then
         MsgBox "No registered functions"
      Else
      Cells(1, 1).Value = "DLL Name"
      Cells(1, 2).Value = "Procedure Name"
      Cells(1, 3).Value = "Data Type Returned"
      For i = 1 To UBound(theArray)
         For j = 1 To 3
            Cells(i + 1, j).Formula = theArray(i, j)
         Next j
      Next i
   End If
End Sub

If you need to generate a list of all DLLs on your system, not just the ones used by Microsoft Excel, use the following code to export the System Info information (see above) to a text file named Msinfo.txt, saved to your \Windows folder:

   Application.SendKeys "%h"
   Application.SendKeys "a"
   Application.SendKeys "%s"
   Application.SendKeys "%s"
   Application.SendKeys "{ESC}"
   Application.SendKeys "{ESC}"
   Application.SendKeys "{ESC}"

After saving Msinfo.txt, your macro can then open the file and access the DLL registration information contained in Column A, under the System DLLs heading.

Additional query words: 5.00 7.00 8.00 XL97

Keywords          : kbprg kbdta KbVBA 
Version           : WINDOWS:5.0,5.0c,7.0,7.0a,97
Platform          : WINDOWS

Last Reviewed: May 17, 1999