Microsoft Forms 2.0 Object Library Work Link

Example – handling a button click dynamically:

On Error Resume Next Dim test As Object Set test = CreateObject("Forms.Form.1") If Err.Number <> 0 Then Debug.Print "Forms 2.0 unavailable in this bitness" Despite being old, Forms 2.0 is still used for legitimate automation: microsoft forms 2.0 object library

Set txt = frm.Controls.Add("Forms.TextBox.1", "MyTextBox", Visible:=True) txt.Text = "Hello Forms 2.0" Example – handling a button click dynamically: On

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 | | Controls | Collection of controls on a form