Link to home
Start Free TrialLog in
Avatar of Mike Eghtebas
Mike EghtebasFlag for United States of America

asked on

number of labels to set invisible...vb.net

I have 8 labels on a form.

Question: How can I make them invisible using something like this:
           Dim i As Integer
            Dim lbl As Label
            Dim strTemp As String
            For i = 1 To 8
                strTemp = "lblNewCust" & i
                lbl = Me.(strTemp)
                lbl.Visible = True
            Next

Open in new window


Please improve this code as necessary. I am getting error at line 6 ("identifier expected").

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada 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 Mike Eghtebas

ASKER

Thank you