Public Sub Worksheet_Change(ByVal Target As Range)
'Gestion évènement echantillon
If Not Intersect([J6:J7], Target) Is Nothing Then
Dim echantillon As String
'Verrouillage de la feuille
With Sheets("Eurofins Potentio - Titrimétrie")
.Unprotect Password:="toto", Contents:=False, UserInterfaceOnly:=True
End With
echantillon = Worksheets("Eurofins Potentio - Titrimétrie").Range("J6").Value
fonction1 = gestion_echantillon(echantillon)
'Deverrouillage de la feuille
With Sheets("Eurofins Potentio - Titrimétrie")
.Protect Password:="toto", Contents:=True, UserInterfaceOnly:=True
End With
End If
'Gestion évènement utilisation d'un banc
If Not Intersect([C17:C18], Target) Is Nothing Then
Dim utilisation As String
'Verrouillage de la feuille
With Sheets("Eurofins Potentio - Titrimétrie")
.Unprotect Password:="toto", Contents:=False, UserInterfaceOnly:=True
End With
utilisation = Worksheets("Eurofins Potentio - Titrimétrie").Range("C17").Value
fonction2 = gestion_utilisation(utilisation)
'Deverrouillage de la feuille
With Sheets("Eurofins Potentio - Titrimétrie")
.Protect Password:="toto", Contents:=True, UserInterfaceOnly:=True
End With
End If
'Gestion évènement nombre de titrant
If Not Intersect([B9:C10], Target) Is Nothing Then
Dim titrant As String
'Verrouillage de la feuille
With Sheets("Eurofins Potentio - Titrimétrie")
.Unprotect Password:="toto", Contents:=False, UserInterfaceOnly:=True
End With
titrant = Worksheets("Eurofins Potentio - Titrimétrie").Range("B9").Value
fonction3 = gestion_titrant(titrant)
'Deverrouillage de la feuille
With Sheets("Eurofins Potentio - Titrimétrie")
.Protect Password:="toto", Contents:=True, UserInterfaceOnly:=True
End With
End If
End Sub