orkael

orkael

  • NA
  • 7
  • 0

Collections

Mar 8 2005 12:13 AM
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)