Collections
Hi all. I am trying to make use of a collections that simultaneously changes a property of several objects. Here is what I've crafted so far:
"
Private Sub Button1_Click(ByVal sender etc etc...)
Dim cmbBoxCollection As New Collection
With cmbBoxCollection
.Add(ComboBox1.Enabled)
.Add(ComboBox2.Enabled)
.Add(ComboBox3.Enabled)
End With
Dim IndexValue As Integer
For Each IndexValue In cmbBoxCollection
Enabled = False
Next
"
However, when I run the application, pressing the button sets everything on the form to enabled=false. If I go for the Visible=False option, the whole form dissapears.
What could be the problem?
Thx in advance

mibuytRank #3,026 · 476 pointsPosted Mar 8, 2005, 5:12 AM EST
orkael7 pointsPosted Mar 8, 2005, 10:12 AM EST
MythicalMeRank #6,347 · 269 pointsPosted Mar 8, 2005, 3:38 PM EST
mibuytRank #3,026 · 476 pointsPosted Mar 8, 2005, 3:53 PM EST
orkael7 pointsPosted Mar 8, 2005, 6:36 PM EST
mibuytRank #3,026 · 476 pointsPosted Mar 8, 2005, 11:13 PM EST
MythicalMeRank #6,347 · 269 pointsPosted Mar 9, 2005, 6:29 AM EST
mibuytRank #3,026 · 476 pointsPosted Mar 9, 2005, 3:02 PM EST
mibuytRank #3,026 · 476 pointsPosted Mar 9, 2005, 3:18 PM EST