P pharaon New member Local time Today, 14:40 Joined Apr 15, 2013 Messages 9 Apr 21, 2013 #1 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
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
missinglinq AWF VIP Local time Today, 17:40 Joined Jun 20, 2003 Messages 6,420 Apr 22, 2013 #2 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)>
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)>