Microsoft Forms 2.0 Object Library May 2026

Dim frm As Object Set frm = CreateObject("Forms.Form.1") Or using the built-in New keyword with a reference set to Microsoft Forms 2.0 Object Library . | Object | Description | |--------|-------------| | Form | Container for controls; supports properties like Caption , Width , Height , BackColor . | | Control | Base class for all form controls. | | Controls | Collection of controls on a form. | | TextBox , ComboBox , etc. | Individual UI elements with events ( Click , Change , Enter , Exit ). | | DataObject | Handles clipboard operations (GetText, SetText, PutInClipboard). | | Font / Picture | Typography and image handling. | Sample instantiation (VBA): Dim frm As Object Dim txt As Object Set frm = CreateObject("Forms.Form.1") frm.Caption = "Dynamic Form" frm.Width = 300 frm.Height = 200

Dim WithEvents btn As MSForms.CommandButton Private Sub btn_Click() MsgBox "Button clicked!" End Sub

While often overlooked, the library has powerful automation interfaces accessible via VBA or any COM-aware language (C#, VB6, PowerShell). : Even in 64-bit Office, FM20.DLL is typically a 32-bit library (due to legacy constraints). This affects cross-bitness COM calls. 2. Core Object Model The main programmatic entry point is the Forms object, created via: