Dim Ma_valeur As String
Dim Debut As Integer
Dim Fin As Integer
Dim Duration As Integer
Dim der_ligne As Integer: Dim der_colonne As Integer
Dim I As Integer
Dim B As Integer
Dim n_ligne As Integer
Ma_valeur = ComboBox1.Value
Debut = SW1.Value
Fin = EW1.Value
Dim Debut1 As Date: Dim Debut2 As Integer: Dim Debut3 As Integer: Dim Debut4 As Integer: Dim Debut5 As Integer: Dim Debut6 As Integer
Dim Fin1 As Integer: Dim Fin2 As Integer: Dim Fin3 As Integer: Dim Fin4 As Integer: Dim Fin5 As Integer: Dim Fin6 As Integer
Fin2 = EW2.Value
Fin3 = EW3.Value
Fin4 = EW4.Value
Fin5 = EW5.Value
Fin6 = EW6.Value
Debut2 = SW2.Value
Debut3 = SW3.Value
Debut4 = SW4.Value
Debut5 = SW5.Value
Debut6 = SW6.Value
Dim Ligne As Integer
Worksheets("WORKLOAD").Select
Ligne = Sheets("WORKLOAD").Range(Ma_valeur).Offset(1, 0).Row
Cells(Ligne, 1).EntireRow.Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromRightOrBelow
Selection.Borders.LineStyle = xlContinuous
Selection.Borders.ThemeColor = 1
Selection.Interior.ColorIndex = 2
Selection.Borders.TintAndShade = -0.249977111117893
Selection.Borders.Weight = xlThin
Cells(Ligne, 1) = ComboBox1.Value
Cells(Ligne, 2) = ComboBox2.Value
Cells(Ligne, 3) = TextBox1.Value
Cells(Ligne, 4) = TextBox2.Value
Cells(Ligne, 5) = TextBox3.Value
Cells(Ligne, 6) = ComboBox4.Value
Cells(Ligne, 7) = Eqpt.Value
Cells(Ligne, 8) = ComboBox3.Value
Cells(Ligne, 9) = Cab1 & Cab2 & Cab3 & Cab4 & Cab5
Cells(Ligne, 10) = Cab6 & Cab7 & Cab8 & Cab9 & Cab10
Cells(Ligne, 11) = Phase.Value
'Cells(Ligne, col) = Charge.Value
autre_page 'CREER LES DATA SUR LA PAGE DP - Reprends une macro plus bas
F_colonne = Cells(6, 33)
der_colonne2020 = Cells(6, 64)
F_colonne2021 = Cells(6, 65)
Der_colonne2021 = Cells(6, 116)
Rows(Ligne).Select
der_colonne = Cells.SpecialCells(xlCellTypeLastCell).Column
For I = 1 To der_colonne
If Cells(6, I) >= Debut And Cells(6, I) <= Fin Then
Cells(Ligne, I) = Wor1
End If
If Cells(6, I) >= Debut2 And Cells(6, I) <= Fin2 Then
Cells(Ligne, I) = Wor2
End If
If Cells(6, I) >= Debut3 And Cells(6, I) <= Fin3 Then
Cells(Ligne, I) = Wor3
End If
If Cells(6, I) >= Debut4 And Cells(6, I) <= Fin4 Then
Cells(Ligne, I) = Wor4
End If
If Cells(6, I) >= Debut5 And Cells(6, I) <= Fin5 Then
Cells(Ligne, I) = Wor5
End If
If Cells(6, I) >= Debut6 And Cells(6, I) <= Fin6 Then
Cells(Ligne, I) = Wor6
End If
Next I
MsgBox "Project " & TextBox2.Value & " " & TextBox3.Value & " has been created successfully", vbOKOnly + vbInformation, "Maison de la qualité"
Unload New_project
Exit Sub
Unload New_project
New_project.Show 0
End Sub