I have an Excel workbook with 2 sheets: `summary` and `ClickHide`.

* `Summary Sheet` contains multiple checkbox forms. When the checkbox is checked, they return a `TRUE` or `FALSE` value in the `ClickHide Sheet`, all in `ROW A`.
* `ClickHideSheet`: Next to these values in `A2:A20`, I attribute a "0" or "1" value to the `TRUE or FALSE` result. These results go horizontally in range `B2:BZ45`. On `ClickHide Row 1`, I have formulae to get a result on top of each column.
* In `Summary B1:BZ1` I have copied links to the cells in `ClickHide A1:BZ1`.

**My question**: 

> 
> I intend to make the columns in `Summary` to automatically hide when the value in their own row is **not** 0. (if B1 is not 0, hide column B, otherwise unhide). The user will interact with the checkboxes, so the macro needs to be triggered every time a checkbox is modified.
> 
> 
> 

I have found code snippets out there, but none of them seem to work. I'm really bad at VBA, so it could be a simple edit that I'm missing.

I've tried both of these, with no success. Have a look [the following reference](https://forum.openoffice.org/en/forum/viewtopic.php?f=20&t=79218).

```
    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim i As Integer
    For i = 2 To 80
        Cells(1, i).EntireColumn.Hidden = Cells(2, i) = 0
    Next
End Sub

```

This next one I don't really know if it's a VBA code or not.

```
oSheets = ThisComponent.getSheets()
oSheet1 = oSheets.getByName("Sheet1")
oColumns = oSheet1.getColumns()
for i = 0 to 25
   oCol = oColumns.getByIndex(i)
   oCell = oSheet1.getCellByPosition(i,0) 'First row has index 0
   If oCell.Value = 0 Then
      oCol.isVisible = False
   Else
      oCol.isVisible = True
   End If
next i

```

I don't know how to embed a spreadsheet in here, so here are pictures of both sheets, simplified to show an example.

* [Summary Sheet](http://i.stack.imgur.com/pHa9u.png)
* [ClickHide Sheet](http://i.stack.imgur.com/0Cjqt.png)

Thanks in advance for any help you can provide.