I'm attempting a program and want to know if there is a way to make a text box only visible when a check box is checked and invisible when not checked. Would it be the same as enabling a command button.
Printable View
I'm attempting a program and want to know if there is a way to make a text box only visible when a check box is checked and invisible when not checked. Would it be the same as enabling a command button.
Hi...
At the time of loading you make text box invisible by setting
text1.visible = false
you can also do so by property setting.
In the check box click event if the value is 1 then make the textbox visible otherwise make it invisible
if check1.value = 1 then
text1.visible = true
end if
if check1.value = 0 then
text1.visible = false
end if
Please try this out.
Santulan
A simpler way is
Sub Check1_Click()
' Display text1 if the box is checked
Text1.Visible = Check1.Value
End Sub