P
photogman
I'm a newbie that is trying to change the color of the background of a
textbox when a checkbox is checked (-1) next to it. So that if the check
box is not checked the textbox next to it will stay the same color, but if
the check box is checked, the textbox will turn let's say gray.
I was able to do it with the whole form background itself, but don't know
how to do it with one textbox. The code that I acquired for the whole form
itself is:
Private Sub Form_Current()
If BOX.Value = -1 Then
Section(0).BackColor = RGB(192, 192, 192)
Section(1).BackColor = RGB(192, 192, 192)
Else
Section(1).BackColor = RGB(12, 255, 255)
Section(0).BackColor = RGB(12, 255, 255)
End If
End Sub
I believe all I need is to understand what the line of code would be for a
particular text box.
Thank you to all that can help me. This may seem very basic to a lot of
you, but for a newbie like myself, can seem like an insurmountable mountain.
textbox when a checkbox is checked (-1) next to it. So that if the check
box is not checked the textbox next to it will stay the same color, but if
the check box is checked, the textbox will turn let's say gray.
I was able to do it with the whole form background itself, but don't know
how to do it with one textbox. The code that I acquired for the whole form
itself is:
Private Sub Form_Current()
If BOX.Value = -1 Then
Section(0).BackColor = RGB(192, 192, 192)
Section(1).BackColor = RGB(192, 192, 192)
Else
Section(1).BackColor = RGB(12, 255, 255)
Section(0).BackColor = RGB(12, 255, 255)
End If
End Sub
I believe all I need is to understand what the line of code would be for a
particular text box.
Thank you to all that can help me. This may seem very basic to a lot of
you, but for a newbie like myself, can seem like an insurmountable mountain.