mushin
Programmer
- Oct 4, 2000
- 49
I am successfully creating and using dynamically created combo boxes, but can not seem to "remove" them. I can hide them but if the user clicks in a certain field the code tries to instantiate tehem again and leads to a runtime error.
my creation code is :
dim WihEvents optbox as ComboBox
Set optbox = Controls.Add("VB.ComboBox, _
"mycomboBox, Picture1)
My remove code is:
Controls.Remove "myComboBox"
I receive a "Cannot Unload Object in this context" error.
Anyone know why or see this before ? Is there some better way to remove Dynamically created Objects......
TIA
my creation code is :
dim WihEvents optbox as ComboBox
Set optbox = Controls.Add("VB.ComboBox, _
"mycomboBox, Picture1)
My remove code is:
Controls.Remove "myComboBox"
I receive a "Cannot Unload Object in this context" error.
Anyone know why or see this before ? Is there some better way to remove Dynamically created Objects......
TIA