1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| Option Explicit
Private Sub OptionButton1_Change()
If OptionButton1.Value = True Then
ActiveSheet.Unprotect Password:="test"
Range("A7:A11").EntireRow.Hidden = False
'Call Afficher
Else
ActiveSheet.Unprotect Password:="test"
Range("A7:A32").EntireRow.Hidden = True
Range("C15").Select
ActiveSheet.Protect Password:="test", DrawingObjects:=True, Contents:=True, Scenarios:= _
False
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$9" Or Target.Address = "$D$9" Then Module1.Afficher
End Sub |
Partager