如题!

解决方案 »

  1.   


    试用controls.add方法。
      

  2.   

    ' 举个例子,动态添加按钮。Option Explicit
    Dim WithEvents cmdOK As CommandButtonPrivate Sub Form_Load()
        Set cmdOK = Controls.Add("VB.CommandButton", "cmdOK", Me)
        With cmdOK
            .Left = 100
            .Top = 100
            .Width = 2000
            .Height = 1000
            .Caption = "确定"
            .Visible = True
        End With
    End SubPrivate Sub cmdOK_Click()
        MsgBox "您单击了确定!"
    End Sub