PDA

Click to See Complete Forum and Search --> : Loop to access all controls on page


griffitd
Jan 11th, 2005, 04:03 AM
I have copied the following code from a vb6 program to loop round all controls on a page:

For Each oControl In Me.Controls
If TypeOf oControl Is Panel Then
oControl.visible = False
End If
Next oControl


this only loops once.

I want to hide all panels on a screen using a loop (so that I don't have to right all 40 panels names out)