Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Collection Object
Message
 
To
All
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Title:
Collection Object
Miscellaneous
Thread ID:
00904122
Message ID:
00904122
Views:
50
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
Map
View

Click here to load this message in the networking platform