You might wonder: "Why should I use FM20 controls when VB6 has its own native controls (Textbox, CommandButton, ListBox, etc.)?" The answer lies in features:
Private Function IsFormsLibraryRegistered() As Boolean
On Error GoTo NotRegistered
Dim fm As Object
Set fm = CreateObject("Forms.UserForm.1")
IsFormsLibraryRegistered = True
Exit Function
NotRegistered:
IsFormsLibraryRegistered = False
End Function
Private Sub Form_Load() ' Add pages to MultiPage control MultiPage1.Pages.Add "Page 3", "Additional Tab"' Add controls to specific page Dim txt As MSForms.TextBox Set txt = MultiPage1.Pages(0).Controls.Add("Forms.TextBox.1") txt.Left = 10 txt.Top = 10 txt.Width = 150End Sub
Private Sub MultiPage1_Change() Caption = "Current Tab: " & MultiPage1.Pages(MultiPage1.Value).Caption End Submicrosoft forms 20 object library vb6