Search code examples
excelvbawindows-7excel-2016

Can't find Microsoft Forms 2.0 Object Library or FM20.DLL


In my Excel 2016 project (Windows 7), I'd like to work with the clipboard:

Dim DataObj As New MSForms.DataObject
DataObj.GetFromClipboard

But I've got this compiler Error at the first line of code:

User-defined type not defined

So I would like to add the reference to the Microsoft Forms 2.0 Object Library but I have no FM20.DLL file on my entire computer (I have searched through explore and find with cygwin).

I expect to see it as in the screenshot below, but I can't find it.

VBA list of available references

How can I make it appear?


Solution

  • From this old knowledge base article my guess would be this DLL is perhaps only included in older versions of Office? This part seemed promising:

    As an alternative to having your end users install Microsoft Office, you can have them freely download and install the Microsoft ActiveX Control Pad, which also installs the Fm20.dll. For more information, see the following Microsoft Developer Network (MSDN) Web site: http://msdn.microsoft.com/en-us/library/ms968493.aspx

    However, as the linked tool is from 1997, you'll need to run its setup in "compatibility mode" by right-clicking on the executable and selecting "Properties" then clicking on the "Compatibility" tab and selecting "Windows 95" in the "Run this program in compatibility mode for:" dropdown. Then run it as administrator (this worked for me using Windows 8.1).