Sunday, December 11, 2011

How can I use a VB / visual basic code to make cells/text appear and appear/disappear in Microsft excel?

basically, when I check a check box and it is ';true'; I want some cells/text to appear. (I'm not sure if the Cells appear/disappear or the Text appear/disappear).



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
  • cool name for a band
  • No comments:

    Post a Comment