How can I use visual basic to do this?How can I use a VB / visual basic code to make cells/text appear and appear/disappear in Microsft excel?
Here's a macro that will turn the color of the text in cell A1 to white if CheckBox1 in unchecked. If the background color is white, the text in the cell will not be visible. When CheckBox1 is checked, the text will turn black and be visible. I'm assuming you know how to make a form check-box and assign a macro to it.
Sub CheckBox1_Click()
'
' CheckBox1_Click Macro
' Macro recorded 11/19/2008
'
With Range(';A1';).Font
If Sheet1.DrawingObjects(';Check box 1';).Value %26gt; 0 Then
.ColorIndex = xlAutomatic
Else
.ColorIndex = 2
End If
End With
End Sub
No comments:
Post a Comment