do .visible = true
do .visible = true
(OP)
I want to do visible a range of textboxs.
each box is called txtm01, txtm02, txtm03 .....
I want to make a loop that makes visible and invicible some
range of boxs.
So I tried this code, but the machine got stuck
what Im doing wrong?
''''''''''''''''''
Do
z = 0 + z
z1 = "txtm0" & z
z2 = z1 & ".Visible = True"
Loop Until z = 1
''''''''''''''''''''''''''''''''''''
Here I want to make visible the textboxs= txtm00 and txtm01
each box is called txtm01, txtm02, txtm03 .....
I want to make a loop that makes visible and invicible some
range of boxs.
So I tried this code, but the machine got stuck
what Im doing wrong?
''''''''''''''''''
Do
z = 0 + z
z1 = "txtm0" & z
z2 = z1 & ".Visible = True"
Loop Until z = 1
''''''''''''''''''''''''''''''''''''
Here I want to make visible the textboxs= txtm00 and txtm01
RE: do .visible = true
In your current code you have an infinite loop situation because the value of 'z' never increments (z = 0 + z just isn't going to do it).
RE: do .visible = true
e.g.
TextBox(1).Visible = True
TextBox(2).Visible = False
Vlado
RE: do .visible = true
Dim X As Control
For Each X In Me.Controls
If TypeOf X Is TextBox Then
X.Visible = False
End If
Next
Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting
RE: do .visible = true
If so ,how""????