Private Sub CheckBox1_Click()
' Skryt stlpce F a G
If CheckBox1.Value = True Then
Columns("F:G").Select
With Selection.EntireColumn
.Hidden = True
End With
End If
'Zobrazit stlpce F a G
If CheckBox1.Value = False Then
Columns("F:G").Select
With Selection.EntireColumn
.Hidden = False
End With
End If
Range("A3").Select
End Sub
Edit: nebo kratší verze bez "blikání"
Private Sub CheckBox1_Click()
'Skryt stlpce F a G
If CheckBox1.Value = True Then
Columns("F:G").Hidden = True
End If
'Zobrazit stlpce F a G
If CheckBox1.Value = False Then
Columns("F:G").Hidden = False
End If
Range("A3").Select
End Subcitovat