Link to home
Start Free TrialLog in
Avatar of dwe0608
dwe0608Flag for Australia

asked on

looping through controls

The following code does not sem to work

 Dim iObj As Control
 
 For Each iObj In Me.Controls
  If iObj.Tag = "hidden" Then
        iObj.Visible = False
  End If
 Next


in each controls tag I place the word "hidden". The controls will consist of labels, textboxes and pictureboxes.
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dwe0608

ASKER

AngelIII, yes, but its a long list ... I have the controls in an array (for each type of control).

pft ... I had misspelled "hidden" - only had one "d" and well what a time waster this has been ....

answer this query for the points ....

If I wanted to store the names of each control in an ini file - including its index, how would I do that ? I could then retrieve it later and then make the controls either hidden or visible depending on the value contained in the ini file ?