How to add the click event for a dynamically created button? Let's say I have created a button in runtime like this - Set ctlCmd1 = Me.Controls.Add("VB.CommandButton", "ctlCmd0") ctlCmd1.Move 4560, (2040 + i * 700), 4455, 495 ctlCmd1.Visible = True So a button with name "ctlCmd0" has been created. Now I want that when anyone will press the button, it should open some other form. If I put normal Private Sub ctlCmd0_Click() event, then it does nothing. So how I can add the Click event to a dynamically created button like this? Thanks in advance.