Option Explicit
 Private Sub ToggleButton1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
     Sheets("Comptes" ).Select
     ActiveSheet.Unprotect ("1234" )
     If Rows("27:38" ).EntireRow.Hidden = True Then
         Dim MDP
         MDP = InputBox("Enter the Password:", "Password" )
         If MDP = "1234" Then
         Rows("27:38" ).EntireRow.Hidden = False
           End If
     Else
     Rows("27:38" ).EntireRow.Hidden = True
     End If
             ActiveSheet.Protect Password:="1234", DrawingObjects:=True, Contents:=True, Scenarios:=True _
         , AllowFormattingCells:=True, AllowFormattingColumns:=True, _
         AllowInsertingColumns:=True, AllowInsertingRows:=True, _
         AllowInsertingHyperlinks:=True, AllowDeletingColumns:=True, _
         AllowDeletingRows:=True, AllowSorting:=True, AllowFiltering:=True, _
         AllowUsingPivotTables:=True
 End Sub
   |