Kod: Zaznacz cały
sub ukryj
Dim Arkusz as Object
Dim Zmiana as Boolean
Dim i as Integer
Dim j as Integer
ThisComponent.enableAutomaticCalculation(FALSE)
Zmiana = NOT ThisComponent.Sheets(0).Columns(4).isVisible
For i = 0 to 12
Arkusz = ThisComponent.Sheets(i)
For j = 4 to 39
If (j < 11 OR (j > 20 AND j < 23) OR j > 30) Then Arkusz.Columns(j).isVisible = Zmiana
Next j
For j = 5 to 31
If Arkusz.getCellByPosition(1,j).String = "0" Then Arkusz.Rows(j).isVisible = Zmiana
Next j
Next i
ThisComponent.enableAutomaticCalculation(TRUE)
End sub