close

Hi,

I have a form with a checkbox and then two textboxes that are associated
with the checkbox. So I want to make the checkboxes unshaded when the
checkbox is selected and quot;shadedquot; when the checkbox is not checked. I have
seen this before in forms. I tried using the quot;visiblequot; property but this
makes the entire box disappear, and I only want it quot;shaddedquot;

Has anyone done something like this before - do you know what property to use.

Thanks

Jeff,
Would this suffice? If so, you probably want to put the ELSE code
in the Userform_Initialize routine.

Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
TextBox1.Enabled = True
TextBox2.Enabled = True
TextBox1.BackColor = amp;H8000000F
TextBox2.BackColor = amp;H8000000F
Else
TextBox1.Enabled = False
TextBox2.Enabled = False
TextBox1.BackColor = amp;H80000011
TextBox2.BackColor = amp;H80000011
End If

End Sub

quot;Jeffquot; wrote:

gt; Hi,
gt;
gt; I have a form with a checkbox and then two textboxes that are associated
gt; with the checkbox. So I want to make the checkboxes unshaded when the
gt; checkbox is selected and quot;shadedquot; when the checkbox is not checked. I have
gt; seen this before in forms. I tried using the quot;visiblequot; property but this
gt; makes the entire box disappear, and I only want it quot;shaddedquot;
gt;
gt; Has anyone done something like this before - do you know what property to use.
gt;
gt; Thanks

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()