Thread
:
Render the contents of a cell invisible
View Single Post
#
8
Posted to microsoft.public.excel.programming
Michel Pierron
external usenet poster
Posts: 214
Render the contents of a cell invisible
Hi Michael,
In the Sheet module:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Range("B1:B5").NumberFormat = IIf([A1] = 1, ";;;", "General")
End Sub
Regards,
MP
a écrit dans le message de news:
...
Michel,
Thanks for your response. It works great with one exception. I need
to assign A1 two different values: A1=1 and A11. With your macro,
when I enter 1, the contents of range B1:B5 does exactly what I had
asked for. However, when I delete the contents of A1 or change the
value to something other than 1, I cannot recall the contents of range
B1:B5, which is something I need to do. Do you have a solution?
Thanks.
Michael
Michel Pierron wrote:
Hi Michael,
Sub Invisible()
With Worksheets(1)
.Range("B1:B5").NumberFormat = IIf(.Range("A1") < "", ";;;", "General")
End With
End Sub
MP
a écrit dans le message de news:
...
Is there a macro that can render the contents of a cell invisible to
both view and to the printer? For example, if cell A10, then the
contents of range B1:B5 are rendered invisible. The formulas and their
returns cannot be altered or made null due to their applications in
other cells. Thanks.
Michael
Reply With Quote
Michel Pierron
View Public Profile
Find all posts by Michel Pierron