General information
Category:
Coding, syntax & commands
Hi All:
I have a collection object and I added couple of controls to it(Combo box and text box). I am trying to remove the collection object. I thought I could use RemoveAll method,but I was wrong. I am getting an error when I try to add a object the second time. What do I need to use in order to remove collection oject, so I can load the collection object second time with new data?
Here is my code
Dim colScroll As New Collection
If sFrame = "Frame" & CStr(1) Then
**Second time loading
colScroll.RemoveAll
'colScroll.Remove sFrame
'Controls.Container.Remove "Combo" & CStr(0)
Else
sFrame = "Frame" & CStr(1)
Controls.Add "VB.Frame", sFrame, Me
End If
Thanks
MA
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only