Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo stoppit Application.EnableEvents = False If Target.Address = "$A$2" And Target.Value = "qwerty" Then Shapes("Rectangle 1").Fill.Transparency = 1# Else Shapes("Rectangle 1").Fill.Transparency = 0# End If stoppit: Application.EnableEvents = True End Sub Gord Dibben MS Excel MVP On Mon, 8 Feb 2010 13:25:04 -0800, Paul Kraemer wrote: Hi, I am using Excel 2007. I have created a worksheet where I would like to be able to "hide" a group of cells based on the value of another cell. I can do what I want by inserting a shape (rectangle) and giving it a white background and a white line color. As I have chosen not to show gridlines on my worksheet, this rectangle effectively hides the cells that are behind it. I can write code to control the visibility of this rectangle based on the value in a particular cell. I imagine that there is a way I can get this code to run anytime the value in this cell changes. I am pretty sure that I can do what I want.....but... I just wanted ask if there is a better way to do this sort of thing? If anyone has any recommendations, I'd really appreciate it. Thanks in advance, Paul |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hiding/Exposing Rows based on a cell value | Excel Worksheet Functions | |||
Hiding rows based on a cell? | Excel Worksheet Functions | |||
hiding or showing rows based on a cell value | Excel Discussion (Misc queries) | |||
Hiding rows based value of cell within row | Excel Discussion (Misc queries) | |||
hiding rows based on cell contents | Excel Discussion (Misc queries) |