Hi,
I'm trying to set several fields to a false visible property when an option is selcted in a combo box.
Does anyone know how to use a variable in a loop to set the visible property to false.
This is the code I'm using, the line in bold being the problem.
thanks in advance.
Private Sub Landlord_Type_Change()
Dim labelC As Integer
Dim counter As Integer
Dim current, property
counter = 0
labelC = 97 'Label counter
Do Until counter = 10
current = "Label" & labelC
Set property = current
property.Visible = False
counter = counter + 1
labelC = labelC + 1
Loop
I'm trying to set several fields to a false visible property when an option is selcted in a combo box.
Does anyone know how to use a variable in a loop to set the visible property to false.
This is the code I'm using, the line in bold being the problem.
thanks in advance.
Private Sub Landlord_Type_Change()
Dim labelC As Integer
Dim counter As Integer
Dim current, property
counter = 0
labelC = 97 'Label counter
Do Until counter = 10
current = "Label" & labelC
Set property = current
property.Visible = False
counter = counter + 1
labelC = labelC + 1
Loop