Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Using a formula it's a bad idea. It's better if you using a macro. Next code does work.

Sub sheets(event)
    doc = ThisComponent

    If event.ImplementationName = "ScCellObj" Then
        ca = event.CellAddress
        If ca.Column = 1 Then
            so = event.SpreadSheet
            c = so.getCellByPosition(0, ca.Row)
            t = LCase(event.String)
            s = doc.Sheets.getByName(c.String)
            If t = "hide" Then
                v = False
            ElseIf t = "show" then
                v = True
                Exit Sub
            End If
            s.isVisible = v
        End If
    End If
End Sub

And set in event "Content changed" in your sheet "Workbook content"

Best regards