Dim WithEvents MyBtn As CommandButton
Set MyBtn = Controls.Add("VB.CommandButton", "Button1")
With MyBtn
.Caption = "我可以響應事件!"
.Width = 1800
.Left = 100
.Top = 700
.Visible = True
End With
Private Sub MyBtn_Click()
MsgBox "我要移除動態加載的控件了!"
Me.Controls.Remove "Button1"
End Sub