Hi John,
no sorry.
I need a InputBox on which i can enter my columns i want to hide.
I use this solution at the moment>
Sub Ausblenden()
Dim Bereich
On Error GoTo ErrAus
Cells.Select
Selection.EntireColumn.Hidden = False
Bereich = InputBox("Columns to hide (C:F,H:H,... ")
If Bereich = "" Then GoTo Ende
Range(Bereich).Select
Selection.EntireColumn.Hidden = True
GoTo Ende
ErrAus:
MsgBox "Please enter correct area"
Ende:
End Sub
Sub Einblenden()
Dim Adr
Adr = ActiveCell.Address
Cells.Select
Selection.EntireColumn.Hidden = False
Range(Adr).Select
End Sub
With this ToggleB.
Private Sub ToggleButton1_Click()
Dim TB As ToggleButton
Set TB = ToggleButton1
If TB.Value = True Then
TB.Caption = "hide column"
Call Ausblenden
Else
TB.Caption = "unhide column"
Call Einblenden
End If
End Sub
Bookmarks