Private Sub ToggleButton1_Click()
Application.ScreenUpdating = False
Sheets("comparison").Unprotect
Sheets("results").Unprotect
If ToggleButton1.Value = True Then
ToggleButton1.Caption = "Français"
col = 1
'Sheets("Infos").Range("B4").Value = "Producer :"
'Sheets("Infos").Range("B5").Value = "Quality :"
'Sheets("Infos").Range("B7").Value = "Visit :"
'Sheets("Infos").Range("B9").Value = "Diameter :"
'Sheets("results").Range("A4").Value = "Results of the test made during the visit"
'Sheets("results").Range("A26").Value = "Mean"
'Sheets("results").Range("A27").Value = "Standard deviation"
'Sheets("results").Range("A29").Value = "Caractéristique" & Chr(10) & "Value"
'Sheets("results").Range("A30").Value = "Specified" & Chr(10) & "caractéristique" & Chr(10) & "Value"
'Sheets("results").Range("A31").Value = "Condition:" & Chr(10) & "Mean. > Vcs"
'Sheets("results").Range("A32").Value = "Condition: Each" & Chr(10) & "Indiv. > Vcs"
'Sheets("results").Range("A33").Value = "Condition:" & Chr(10) & "Mean. > Vcs+10" & Chr(10) & "and each value" & Chr(10) & "indiv. > 0,95*Vcs"
'Sheets("comparison").Range("A1").Value = "Comparison method of the variances and the means (TRA 418/1)"
'Sheets("comparison").Range("A9").Value = "nbr samples"
'Sheets("comparison").Range("C8").Value = "Visit"
'Sheets("comparison").Range("F8").Value = "Visit"
'Sheets("comparison").Range("A40").Value = "mean ="
'Sheets("comparison").Range("D40").Value = "mean ="
'Sheets("comparison").Range("A41").Value = "standard deviation ="
'Sheets("comparison").Range("D41").Value = "standard deviation ="
'Sheets("comparison").Range("A42").Value = "caract. value ="
'Sheets("comparison").Range("D42").Value = "caract. value ="
'Sheets("comparison").Range("A43").Value = "variance ="
'Sheets("comparison").Range("D43").Value = "variance ="
'Sheets("comparison").Range("C57").FormulaLocal = "=SI(B49<=B45;""Variances: Results OK F < Fo(5%) (case a - TRA 418/1)"";SI(ET(B49>B45;B49<B44);""Variances probably different - Justification ! Fo(5%) < F < Fo(1%) (case b - TRA 418/1)"";""Variances most probably différent - Results NOK F > Fo(1%) (case c - TRA 418/1)""))"
'Sheets("comparison").Range("C58").FormulaLocal = "=SI(B54<=B47;""Means: Results OK |t| < to(5%) (case a - TRA 418/1)"";SI(ET(B54>B47;B54<B46);""Means probably different - Justification ! to(5%) < |t| < to(1%) (case b - TRA 418/1)"";""Means most probably different - Results NOK |t| > to(1%) (case c - TRA 418/1)""))"
'Sheets("comparison").Range("C60").FormulaLocal = "=SI(E49<=E45;""Variances: Résults OK F < Fo(5%) (case a - TRA 418/1)"";SI(ET(E49>E45;E49<E44);""Variances probably different - Justification ! Fo(5%) < F < Fo(1%) (case b - TRA 418/1)"";""Variances most probably different - Résultats NOK F > Fo(1%) (case c - TRA 418/1)""))"
'Sheets("comparison").Range("C61").FormulaLocal = "=SI(E54<=E47;""Means: Results OK |t| < to(5%) (case a - TRA 418/1)"";SI(ET(E54>E47;E54<E46);""Means probably different - Justification ! to(5%) < |t| < to(1%) (case b - TRA 418/1)"";""Means most probably different - Résults NOK |t| > to(1%) (case c TRA 418/1)""))"
Else
col = 2
ToggleButton1.Caption = "Anglais"
'Sheets("Infos").Range("B4").Value = "Usine :"
'Sheets("Infos").Range("B5").Value = "Qualité :"
'Sheets("Infos").Range("B7").Value = "Visite :"
'Sheets("Infos").Range("B9").Value = "Diamètre :"
'Sheets("results").Range("A4").Value = "Les résultats du test fait au cours de la visite"
'Sheets("results").Range("A26").Value = "Moyenne"
'Sheets("results").Range("A27").Value = "Ecart-type"
'Sheets("results").Range("A29").Value = "Valeur" & Chr(10) & "caractéristique"
'Sheets("results").Range("A30").Value = "Valeur" & Chr(10) & "caractéristique" & Chr(10) & "spécifiées"
'Sheets("results").Range("A31").Value = "Condition:" & Chr(10) & "Moy. > Vcs"
'Sheets("results").Range("A32").Value = "Condition: chaque" & Chr(10) & "Indiv. > Vcs"
'Sheets("results").Range("A33").Value = "Condition:" & Chr(10) & "Moy. > Vcs+10" & Chr(10) & "et chaque" & Chr(10) & "indiv. > 0,95*Vcs"
'Sheets("comparison").Range("A1").Value = "Méthode de comparaison pour les variances et les moyennes (TRA 418/1)"
'Sheets("comparison").Range("A9").Value = "nbr exemple"
'Sheets("comparison").Range("C8").Value = "Visite"
'Sheets("comparison").Range("F8").Value = "Visite"
'Sheets("comparison").Range("A40").Value = "moyenne ="
'Sheets("comparison").Range("D40").Value = "moyenne ="
'Sheets("comparison").Range("A41").Value = "écart-type ="
'Sheets("comparison").Range("D41").Value = "écart-type ="
'Sheets("comparison").Range("A42").Value = "valeur caract. ="
'Sheets("comparison").Range("D42").Value = "valeur caract. ="
'Sheets("comparison").Range("A43").Value = "désaccord ="
'Sheets("comparison").Range("D43").Value = "désaccord ="
'Sheets("comparison").Range("C57").FormulaLocal = "=SI(B49<=B45;""Variances: Résultats OK F < Fo(5%) (case a - TRA 418/1)"";SI(ET(B49>B45;B49<B44);""Variances probablement différente - Justification ! Fo(5%) < F < Fo(1%) (case b - TRA 418/1)"";""Variances presque certainement différentes - Résultats NOK F > Fo(1%) (case c - TRA 418/1)""))"
'Sheets("comparison").Range("C58").FormulaLocal = "=SI(B54<=B47;""Moyenne: Resultats OK |t| < to(5%) (case a - TRA 418/1)"";SI(ET(B54>B47;B54<B46);""Moyenne probablement différente - Justification ! to(5%) < |t| < to(1%) (case b - TRA 418/1)"";""Moyenne presque certainement différentes - Resultats NOK |t| > to(1%) (case c - TRA 418/1)""))"
'Sheets("comparison").Range("C60").FormulaLocal = "=SI(E49<=E45;""Variances: Résultats OK F < Fo(5%) (case a - TRA 418/1)"";SI(ET(E49>E45;E49<E44);""Variances probablement différente - Justification ! Fo(5%) < F < Fo(1%) (case b - TRA 418/1)"";""Variances presque certainement différentes - Résultats NOK F > Fo(1%) (case c - TRA 418/1)""))"
'Sheets("comparison").Range("C61").FormulaLocal = "=SI(E54<=E47;""Moyenne: Resultats OK |t| < to(5%) (case a - TRA 418/1)"";SI(ET(E54>E47;E54<E46);""Moyenne probablement différente - Justification ! to(5%) < |t| < to(1%) (case b - TRA 418/1)"";""Moyenne presque certainement différentes - Résultats NOK |t| > to(1%) (case c TRA 418/1)""))"
End If
Set Trad = Sheets("Traduction")
With Sheets("Infos")
.Range("B4").Value = Trad.Cells(2, col).Value '"Producer :"
.Range("B5").Value = Trad.Cells(3, col).Value '"Quality :"
.Range("B7").Value = Trad.Cells(4, col).Value '"Visit :"
.Range("B9").Value = Trad.Cells(5, col).Value '"Diameter :"
End With
With Sheets("results")
.Range("A4").Value = Trad.Cells(6, col).Value '"Results of the test made during the visit"
.Range("A26").Value = Trad.Cells(7, col).Value ' "Mean"
.Range("A27").Value = Trad.Cells(8, col).Value '"Standard deviation"
.Range("A29").Value = Trad.Cells(9, col).Value '"Caractéristique" & Chr(10) & "Value"
.Range("A30").Value = Trad.Cells(10, col).Value '"Specified" & Chr(10) & "caractéristique" & Chr(10) & "Value"
.Range("A31").Value = Trad.Cells(11, col).Value '"Condition:" & Chr(10) & "Mean. > Vcs"
.Range("A32").Value = Trad.Cells(12, col).Value '"Condition: Each" & Chr(10) & "Indiv. > Vcs"
.Range("A33").Value = Trad.Cells(13, col).Value '"Condition:" & Chr(10) & "Mean. > Vcs+10" & Chr(10) & "and each value" & Chr(10) & "indiv. > 0,95*Vcs"
End With
With Sheets("comparison")
.Range("A1").Value = Trad.Cells(14, col).Value '"Comparison method of the variances and the means (TRA 418/1)"
.Range("A9").Value = Trad.Cells(15, col).Value '"nbr samples"
.Range("C8").Value = Trad.Cells(4, col).Value ' "Visit"
.Range("F8").Value = Trad.Cells(4, col).Value ' "Visit"
.Range("A40").Value = Trad.Cells(7, col).Value & " =" '"mean ="
.Range("D40").Value = Trad.Cells(7, col).Value & " =" '"mean ="
.Range("A41").Value = Trad.Cells(8, col).Value & " =" '"standard deviation ="
.Range("D41").Value = Trad.Cells(8, col).Value & " =" '"standard deviation ="
.Range("A42").Value = Trad.Cells(16, col).Value & " =" '"caract. value ="
.Range("D42").Value = Trad.Cells(16, col).Value & " =" '"caract. value ="
.Range("A43").Value = Trad.Cells(17, col).Value & " =" '"variance ="
.Range("D43").Value = Trad.Cells(17, col).Value & " =" '"variance ="
.Range("C57").FormulaLocal = "=SI(B49<=B45;"" & Trad.Cells(18, col).Value & "";SI(ET(B49>B45;B49<B44);"" & Trad.Cells(19, col).Value & "";"" & Trad.Cells(20, col).Value & ""))"
.Range("C58").FormulaLocal = "=SI(B54<=B47;" & Trad.Cells(21, col).Value & ";SI(ET(B54>B47;B54<B46);" & Trad.Cells(22, col).Value & ";" & Trad.Cells(23, col).Value & "))"
.Range("C60").FormulaLocal = "=SI(E49<=E45;" & Trad.Cells(24, col).Value & ";SI(ET(E49>E45;E49<E44);" & Trad.Cells(25, col).Value & ";" & Trad.Cells(26, col).Value & "))"
.Range("C61").FormulaLocal = "=SI(E54<=E47;" & Trad.Cells(27, col).Value & ";SI(ET(E54>E47;E54<E46);" & Trad.Cells(28, col).Value & ";" & Trad.Cells(29, col).Value & "))"
End With
Sheets("comparison").Protect
Sheets("results").Protect
Application.ScreenUpdating = True
End Sub