Hiding rows by a logic formula
Ack - and again :(
I've been trying to work out how to refer to a checkbox on a worksheet,
without success. I added a checkbox to a blank sheet, then tried to refer
to it through Sheet.OLEObjects, but it wasn't there. Anyway, unless someone
else can tell you how to do this, I suggest you use the value held in the
linked cell (which I've named 'CheckBoxLinked'):
Sub ShowHideRows()
If Sheets("Main").Range("CheckBoxLinked").Value Then 'checkbox is
ticked
Sheets("Main").Range("ExtraRows").EntireRow.Hidden = False
Else
Sheets("Main").Range("ExtraRows").EntireRow.Hidden = True
End If
End Sub
Iain
|