在程式中如何動態加入控制元件的事件程序呢 ?(編號:1460)

我寫了一個程式如下:
Option Explicit
Dim WithEvents ctlCommand As VB.CommandButton
Public CommandButtonCount As Integer
Public CommandButtonX, CommandButtonY As Integer
Private Sub Command1_Click()
Dim CommandButtonName As String
Dim x, y, z As Integer
CommandButtonCount = CommandButtonCount + 1
z = 4
CommandButtonY = (CommandButtonCount \ z) + 1
CommandButtonX = z - ((z * CommandButtonY) - CommandButtonCount)
If CommandButtonX = 0 Then
CommandButtonY = CommandButtonY - 1
  CommandButtonX = (z * CommandButtonY) \ CommandButtonY
End If
CommandButtonName = "Button" + Trim(Str(CommandButtonX)) + Trim(Str(CommandButtonY))
' 動態新增 CommandButton 控制項
Set ctlCommand = Controls.Add("VB.CommandButton", CommandButtonName, Form1)
' 設定 CommandButton 控制項的標題
ctlCommand.Caption = CommandButtonName
' 設定 CommandButton 控制項的位置及大小
y = 550 * (CommandButtonY - 1)
x = 1550 * (CommandButtonX - 1)
ctlCommand.Move x, y, 1500, 500
' 設定 CommandButton 控制項的 Visible 屬性為 True
ctlCommand.Visible = True
End Sub
Private Sub Form_Load()
CommandButtonCount = 0
CommandButtonX = 0
CommandButtonY = 0
End Sub
作用是當我按下 command1 button 時程式會動態新增一個 command button 元件
但是我不知道要如何同時產生該新增的 command button 的 click 事件程序
不知有哪為前輩可以告訴我
Thank !!!