Worksheets("Planning Travail").Activate
ech = TextBox6.Value
Dim rerech As Range
If ech = "" Then
MsgBox ("La réception des échantillons n'est attribuée à personne.")
GoTo tt
End If
Set rerech = Cells.Find(What:=ech, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False)
If rerech Is Nothing Then
MsgBox (ech & " est absent(e) cette semaine. Attribuer la réception des échantillons à une autre personne")
TextBox6 = ""
GoTo tt
Else: rerech.Activate
If ActiveCell.Offset(2, -2).Interior.ColorIndex = 48 Or ActiveCell.Offset(2, -1).Interior.ColorIndex = 48 Or ActiveCell.Offset(2, 0).Interior.ColorIndex = 48 Or ActiveCell.Offset(2, 1).Interior.ColorIndex = 48 Or ActiveCell.Offset(2, 2).Interior.ColorIndex = 48 Then
[SIZE="4"]Echantillons.Show[/SIZE]
End If
End If
If ActiveCell.Offset(2, -2).Interior.ColorIndex <> 48 And ActiveCell.Offset(2, -1).Interior.ColorIndex <> 48 And ActiveCell.Offset(2, 0).Interior.ColorIndex <> 48 And ActiveCell.Offset(2, 1).Interior.ColorIndex <> 48 And ActiveCell.Offset(2, 2).Interior.ColorIndex <> 48 Then
ActiveCell.Offset(4, -2).Select
ActiveCell = "Réception des échantillons"
With Selection.Font
.Name = "Comic Sans MS"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleSingle
.ColorIndex = 3
End With
Selection.Font.Bold = True
End If
tt:
PPI = TextBox11.Value
Dim reppi As Range
If PPI = "" Then
MsgBox ("La libération de l'eau ppi n'est attribué à personne.")
GoTo ddd
End If
Set reppi = Cells.Find(What:=PPI, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False)
If reppi Is Nothing Then
MsgBox (ech & " est absent(e) cette semaine. Attribuer la libération de l'eau ppi à une autre personne")
TextBox11 = ""
GoTo ddd
Else: reppi.Activate
If ActiveCell.Offset(2, -2).Interior.ColorIndex = 48 Or ActiveCell.Offset(2, -1).Interior.ColorIndex = 48 Or ActiveCell.Offset(2, 0).Interior.ColorIndex = 48 Or ActiveCell.Offset(2, 1).Interior.ColorIndex = 48 Or ActiveCell.Offset(2, 2).Interior.ColorIndex = 48 Then
[SIZE="4"]usfppi.Show[/SIZE]
End If
End If
Dim presech As String
If ActiveCell.Offset(4, -2).Value <> "" Then
presech = ActiveCell.Offset(4, -2).Value
If ActiveCell.Offset(2, -2).Interior.ColorIndex <> 48 And ActiveCell.Offset(2, -1).Interior.ColorIndex <> 48 And ActiveCell.Offset(2, 0).Interior.ColorIndex <> 48 And ActiveCell.Offset(2, 1).Interior.ColorIndex <> 48 And ActiveCell.Offset(2, 2).Interior.ColorIndex <> 48 Then
ActiveCell.Offset(4, -2).Select
ActiveCell = presech & " et Libération eau ppi 8H00"
With Selection.Font
.Name = "Comic Sans MS"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleSingle
.ColorIndex = 3
End With
Selection.Font.Bold = True
GoTo ddd
End If
End If
If ActiveCell.Offset(2, -2).Interior.ColorIndex <> 48 And ActiveCell.Offset(2, -1).Interior.ColorIndex <> 48 And ActiveCell.Offset(2, 0).Interior.ColorIndex <> 48 And ActiveCell.Offset(2, 1).Interior.ColorIndex <> 48 And ActiveCell.Offset(2, 2).Interior.ColorIndex <> 48 Then
ActiveCell.Offset(4, -2).Select
ActiveCell = "Libération de l'eau ppi 8H00"
With Selection.Font
.Name = "Comic Sans MS"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleSingle
.ColorIndex = 3
End With
Selection.Font.Bold = True
End If
ddd: CommandButton2.Enabled = True
End Sub