Private WithEvents command2 As CommandButton Private Sub Command1_Click() Set command2 = New Controls.add("VB.CommandButton","Button") End Sub vb控件的事件是前期绑定的所以要先声明 Private WithEvents command2 As CommandButton
写错了更正一下 Private WithEvents command2 As CommandButton Private Sub Command1_Click() Set command2 = Controls.add("VB.CommandButton","Button") End Sub vb控件的事件是前期绑定的所以要先声明 Private WithEvents command2 As CommandButton
CreateWindowEx(...)
Private Sub Command1_Click()
Set command2 = New Controls.add("VB.CommandButton","Button")
End Sub
vb控件的事件是前期绑定的所以要先声明
Private WithEvents command2 As CommandButton
Private WithEvents command2 As CommandButton
Private Sub Command1_Click()
Set command2 = Controls.add("VB.CommandButton","Button")
End Sub
vb控件的事件是前期绑定的所以要先声明
Private WithEvents command2 As CommandButton