unloadPrivate Sub Command1_Click(Index As Integer)
MsgBox "Command1(" & CStr(Index) & ")"
End SubPrivate Sub Command2_Click()
Unload Command1(1)
End SubPrivate Sub Form_Load()
Load Command1(1)
Command1(1).Left = 400
Command1(1).Top = 400
Command1(1).Width = 1215
Command1(1).Height = 495
Command1(1).Visible = True
End Sub
MsgBox "Command1(" & CStr(Index) & ")"
End SubPrivate Sub Command2_Click()
Unload Command1(1)
End SubPrivate Sub Form_Load()
Load Command1(1)
Command1(1).Left = 400
Command1(1).Top = 400
Command1(1).Width = 1215
Command1(1).Height = 495
Command1(1).Visible = True
End Sub
只能用remove删除用add添加的控件