Private Sub Worksheet_SelectionChange(ByVal R As Range)
'affiche ligne hauteur 50 ou 300
Application.EnableEvents = False
Application.ScreenUpdating = False
ActiveSheet.Unprotect Password:=""
'Static memoLigne As Range
If R.Row < 7 Then Exit Sub
If Not memoLigne Is Nothing And Not memoLigne Is R.Rows(1) Then memoLigne.RowHeight = 50
Cells(ActiveCell.Row, 1).Select
Range(ActiveCell.Offset(0, 0), ActiveCell.Offset(0, 4)).Select
With Selection.Font
.ThemeColor = xlThemeColorAccent3
.TintAndShade = 0.599993896298105
End With
Cells(ActiveCell.Row, 1).Select
Range(ActiveCell.Offset(0, 6), ActiveCell.Offset(0, 8)).Select
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Cells(ActiveCell.Row, 1).Select
Set memoLigne = R.Rows(1)
memoLigne.RowHeight = 300
Cells(ActiveCell.Row, 1).Select
Range(ActiveCell.Offset(0, 0), ActiveCell.Offset(0, 13)).Select
With Selection.Font
.ColorIndex = xlAutomatic
.TintAndShade = 0
End With
Cells(ActiveCell.Row, 1).Select
ActiveSheet.Protect Password:="", DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveSheet.EnableSelection = xlNoRestrictions
Application.ScreenUpdating = True
Application.EnableEvents = True
ActiveWindow.ScrollRow = Selection.Row
Application.EnableEvents = True
Application.ScreenUpdating = True
ActiveSheet.Protect Password:="", DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveSheet.EnableSelection = xlNoRestrictions
end sub