I have a series of text boxes labled D01H1..D01.H16. I want to be able to set properties on these text boxes in a loop with the following code (that is test code, to see if the addressing of the text boxes works). I have included three abortive attempts at addressing the text boxes using the loop counter.
Thanks in advance
Private Sub Doit_Click()
Dim red As Integer
Dim blue As Integer
Dim green As Integer
red = 0
blue = 0
green = 0
For I = 1 To 16
Me.D01HI.BackColor = RGB(red, blue, green)
'Me.D01H& I.BackColor = RGB(red, blue, green)
'Me.D01H(I).BackColor = RGB(red, blue, green)
red = red + 1
Next
End Sub
jpl
Thanks in advance
Private Sub Doit_Click()
Dim red As Integer
Dim blue As Integer
Dim green As Integer
red = 0
blue = 0
green = 0
For I = 1 To 16
Me.D01HI.BackColor = RGB(red, blue, green)
'Me.D01H& I.BackColor = RGB(red, blue, green)
'Me.D01H(I).BackColor = RGB(red, blue, green)
red = red + 1
Next
End Sub
jpl