Help in code

pharaon

New member
Local time
Today, 14:40
Joined
Apr 15, 2013
Messages
9
how to hide all form controls at once like if i have many text box and labels how to make a loop to hide it all at once
 
There are a number of variations on this, but to do as you've stated would simply be

Code:
Dim ctrl As Control

For Each ctrl In Me.Controls
   ctrl.Visible = False
Next

To only do this to certain Controls, you can place something in the Controls' Tag Properties, let say marked, and then
Code:
Dim ctrl As Control
For Each ctrl In Me.Controls
  If ctrl.Tag = "marked" Then
    ctrl.Visible = False
  End If
Next
Where, exactly, you place the code depends on your needs.

Linq ;0)>
 

Users who are viewing this thread

Back
Top Bottom