9
Answers

Collections

orkael

orkael

19y
2.7k
1
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
Answers (9)
Next Recommended Forum