Link to home
Start Free TrialLog in
Avatar of b001
b001Flag for Afghanistan

asked on

vb basic textbox as variable

Hi Experts

On my form I have more than 100 textbox and I would like change the backcolor through programming
I tried
  dim newlev as string
   Dim newx As String
        For x = 1 To 7
            newlev = "sel" + Str(x).ToString.Trim
            If newlev = texthitx Then
                newx = newlev + ".BackColor"
                "& newx = Color.FromArgb(224, 224, 244)
            End If
                "& newx = Color.FromArgb(255, 255, 192)
        Next

It does not wotk

" & newx   line is not correct.

please help
Thanks
ASKER CERTIFIED SOLUTION
Avatar of Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger)
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