我想动态加载Combo,其中有一段代码如下:
IsObject = NewCmbAteCom Is Nothing
If IsObject = False Then
  Controls.Remove NewCmbAteCom
  Set NewCmbAteCom = Nothing
End IfSet NewCmbAteCom = Controls.Add("VB.ComboBox", "cmbAteCom", Frame1)
            
NewCmbAteCom.AddItem "COM1", 0
NewCmbAteCom.AddItem "COM2", 1
NewCmbAteCom.Visible = True如NewCmbAteCom=Nothing,此段代码没问题;
但是,NewCmbAteCom不是Nothing,Remove 句在运行时错误,显示:
"The control is no longer usable because it has been removed from the controls collection"不知如何做才能处理这个问题?
哪位帮忙一下,先谢谢了!