N
Nanard
Guest
Bonsoir le forum,
Voici mon problème :
J'ai 13 optionButton que j'utilise dand un USF
Avec un commandButton1, je valide l'opération en cliquant
Quelquefois les informations renvoyées sont justes, d'autres fois les informations renvoyées sont des zéros ou rien !!!!
Je n'y comprend plus rien merci pour l'aide
Mon code est un peu long mais le voici :
Private Sub CommandButton1_Click()
'Bouton 8 Distance
If OptionButton8.Value = True And OptionButton1.Value = True Then
Sheets("Distance").Range("A13").Value = TextBox1.Value
Range("A13:J13").Select
Selection.NumberFormat = "0.00"
TextBox2.Value = Range("C13").Value
TextBox3.Value = Range("D13").Value
TextBox4.Value = Range("E13").Value
TextBox5.Value = Range("F13").Value
TextBox6.Value = Range("G13").Value
TextBox7.Value = Range("H13").Value
TextBox8.Value = Range("I13").Value
TextBox9.Value = Range("J13").Value
TextBox1.SetFocus
End If
If OptionButton8.Value = True And OptionButton2.Value = True Then
Sheets("Distance").Range("A12").Value = TextBox1.Value
TextBox2.Value = Range("C12").Value
TextBox3.Value = Range("D12").Value
TextBox4.Value = Range("E12").Value
TextBox5.Value = Range("F12").Value
TextBox6.Value = Range("G12").Value
TextBox7.Value = Range("H12").Value
TextBox8.Value = Range("I12").Value
TextBox9.Value = Range("J13").Value
TextBox1.SetFocus
End If
If OptionButton8.Value = True And OptionButton3.Value = True Then
Sheets("Distance").Range("A11").Value = TextBox1.Value
TextBox2.Value = Range("C11").Value
TextBox3.Value = Range("D11").Value
TextBox4.Value = Range("E11").Value
TextBox5.Value = Range("F11").Value
TextBox6.Value = Range("G11").Value
TextBox7.Value = Range("H11").Value
TextBox8.Value = Range("I11").Value
TextBox9.Value = Range("J13").Value
TextBox1.SetFocus
End If
If OptionButton8.Value = True And OptionButton4.Value = True Then
Sheets("Distance").Range("A10").Value = TextBox1.Value
TextBox2.Value = Range("C10").Value
TextBox3.Value = Range("D10").Value
TextBox4.Value = Range("E10").Value
TextBox5.Value = Range("F10").Value
TextBox6.Value = Range("G10").Value
TextBox7.Value = Range("H10").Value
TextBox8.Value = Range("I10").Value
TextBox9.Value = Range("J13").Value
TextBox1.SetFocus
End If
If OptionButton8.Value = True And OptionButton5.Value = True Then
Sheets("Distance").Range("A9").Value = TextBox1.Value
TextBox2.Value = Range("C9").Value
TextBox3.Value = Range("D9").Value
TextBox4.Value = Range("E9").Value
TextBox5.Value = Range("F9").Value
TextBox6.Value = Range("G9").Value
TextBox7.Value = Range("H9").Value
TextBox8.Value = Range("I9").Value
TextBox9.Value = Range("J13").Value
TextBox1.SetFocus
End If
If OptionButton8.Value = True And OptionButton6.Value = True Then
Sheets("Distance").Range("A8").Value = TextBox1.Value
TextBox2.Value = Range("C8").Value
TextBox3.Value = Range("D8").Value
TextBox4.Value = Range("E8").Value
TextBox5.Value = Range("F8").Value
TextBox6.Value = Range("G8").Value
TextBox7.Value = Range("H8").Value
TextBox8.Value = Range("I8").Value
TextBox9.Value = Range("J13").Value
TextBox1.SetFocus
End If
If OptionButton8.Value = True And OptionButton7.Value = True Then
Sheets("Distance").Range("A7").Value = TextBox1.Value
TextBox2.Value = Range("C7").Value
TextBox3.Value = Range("D7").Value
TextBox4.Value = Range("E7").Value
TextBox5.Value = Range("F7").Value
TextBox6.Value = Range("G7").Value
TextBox7.Value = Range("H7").Value
TextBox8.Value = Range("I7").Value
TextBox9.Value = Range("J13").Value
TextBox1.SetFocus
End If
'<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
'Bouton 9 Contenance
If OptionButton9.Value = True And OptionButton1.Value = True Then
Sheets("Contenance").Range("A13").Value = TextBox1.Value
Range("A13:H13").Select
Selection.NumberFormat = "0.00"
TextBox2.Value = Range("C13").Value
TextBox3.Value = Range("D13").Value
TextBox4.Value = Range("E13").Value
TextBox5.Value = Range("F13").Value
TextBox6.Value = Range("G13").Value
TextBox7.Value = Range("H13").Value
TextBox1.SetFocus
End If
If OptionButton9.Value = True And OptionButton2.Value = True Then
Sheets("Contenance").Range("A12").Value = TextBox1.Value
TextBox2.Value = Range("C12").Value
TextBox3.Value = Range("D12").Value
TextBox4.Value = Range("E12").Value
TextBox5.Value = Range("F12").Value
TextBox6.Value = Range("G12").Value
TextBox7.Value = Range("H12").Value
TextBox1.SetFocus
End If
If OptionButton9.Value = True And OptionButton3.Value = True Then
Sheets("Contenance").Range("A11").Value = TextBox1.Value
TextBox2.Value = Range("C11").Value
TextBox3.Value = Range("D11").Value
TextBox4.Value = Range("E11").Value
TextBox5.Value = Range("F11").Value
TextBox6.Value = Range("G11").Value
TextBox7.Value = Range("H11").Value
TextBox1.SetFocus
End If
If OptionButton9.Value = True And OptionButton4.Value = True Then
Sheets("Contenance").Range("A10").Value = TextBox1.Value
TextBox2.Value = Range("C10").Value
TextBox3.Value = Range("D10").Value
TextBox4.Value = Range("E10").Value
TextBox5.Value = Range("F10").Value
TextBox6.Value = Range("G10").Value
TextBox7.Value = Range("H10").Value
TextBox1.SetFocus
End If
If OptionButton9.Value = True And OptionButton5.Value = True Then
Sheets("Contenance").Range("A9").Value = TextBox1.Value
TextBox2.Value = Range("C9").Value
TextBox3.Value = Range("D9").Value
TextBox4.Value = Range("E9").Value
TextBox5.Value = Range("F9").Value
TextBox6.Value = Range("G9").Value
TextBox7.Value = Range("H9").Value
TextBox1.SetFocus
End If
If OptionButton9.Value = True And OptionButton6.Value = True Then
Sheets("Contenance").Range("A8").Value = TextBox1.Value
TextBox2.Value = Range("C8").Value
TextBox3.Value = Range("D8").Value
TextBox4.Value = Range("E8").Value
TextBox5.Value = Range("F8").Value
TextBox6.Value = Range("G8").Value
TextBox7.Value = Range("H8").Value
TextBox1.SetFocus
End If
'<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
If OptionButton10.Value = True And OptionButton1.Value = True Then
Sheets("Poids").Range("A15").Value = TextBox1.Value
Range("A15:K15").Select
Selection.NumberFormat = "0.00"
TextBox2.Value = Range("C15").Value
TextBox3.Value = Range("D15").Value
TextBox4.Value = Range("E15").Value
TextBox5.Value = Range("F15").Value
TextBox6.Value = Range("G15").Value
TextBox7.Value = Range("H15").Value
TextBox8.Value = Range("I15").Value
TextBox9.Value = Range("J15").Value
TextBox10.Value = Range("K15").Value
TextBox1.SetFocus
End If
If OptionButton10.Value = True And OptionButton2.Value = True Then
Sheets("Poids").Range("A14").Value = TextBox1.Value
TextBox2.Value = Range("C14").Value
TextBox3.Value = Range("D14").Value
TextBox4.Value = Range("E14").Value
TextBox5.Value = Range("F14").Value
TextBox6.Value = Range("G14").Value
TextBox7.Value = Range("H14").Value
TextBox8.Value = Range("I14").Value
TextBox9.Value = Range("J14").Value
TextBox10.Value = Range("K14").Value
TextBox1.SetFocus
End If
If OptionButton10.Value = True And OptionButton3.Value = True Then
Sheets("Poids").Range("A13").Value = TextBox1.Value
TextBox2.Value = Range("C13").Value
TextBox3.Value = Range("D13").Value
TextBox4.Value = Range("E13").Value
TextBox5.Value = Range("F13").Value
TextBox6.Value = Range("G13").Value
TextBox7.Value = Range("H13").Value
TextBox8.Value = Range("I13").Value
TextBox9.Value = Range("J13").Value
TextBox10.Value = Range("K13").Value
TextBox1.SetFocus
End If
If OptionButton10.Value = True And OptionButton4.Value = True Then
Sheets("Poids").Range("A12").Value = TextBox1.Value
TextBox2.Value = Range("C12").Value
TextBox3.Value = Range("D12").Value
TextBox4.Value = Range("E12").Value
TextBox5.Value = Range("F12").Value
TextBox6.Value = Range("G12").Value
TextBox7.Value = Range("H12").Value
TextBox8.Value = Range("I12").Value
TextBox9.Value = Range("J12").Value
TextBox10.Value = Range("K12").Value
TextBox1.SetFocus
End If
If OptionButton10.Value = True And OptionButton5.Value = True Then
Sheets("Poids").Range("A11").Value = TextBox1.Value
TextBox2.Value = Range("C11").Value
TextBox3.Value = Range("D11").Value
TextBox4.Value = Range("E11").Value
TextBox5.Value = Range("F11").Value
TextBox6.Value = Range("G11").Value
TextBox7.Value = Range("H11").Value
TextBox8.Value = Range("I11").Value
TextBox9.Value = Range("J11").Value
TextBox10.Value = Range("K11").Value
TextBox1.SetFocus
End If
If OptionButton10.Value = True And OptionButton6.Value = True Then
Sheets("Poids").Range("A10").Value = TextBox1.Value
TextBox2.Value = Range("C10").Value
TextBox3.Value = Range("D10").Value
TextBox4.Value = Range("E10").Value
TextBox5.Value = Range("F10").Value
TextBox6.Value = Range("G10").Value
TextBox7.Value = Range("H10").Value
TextBox8.Value = Range("I10").Value
TextBox9.Value = Range("J10").Value
TextBox10.Value = Range("K10").Value
TextBox1.SetFocus
End If
If OptionButton10.Value = True And OptionButton7.Value = True Then
Sheets("Poids").Range("A9").Value = TextBox1.Value
TextBox2.Value = Range("C9").Value
TextBox3.Value = Range("D9").Value
TextBox4.Value = Range("E9").Value
TextBox5.Value = Range("F9").Value
TextBox6.Value = Range("G9").Value
TextBox7.Value = Range("H9").Value
TextBox8.Value = Range("I9").Value
TextBox9.Value = Range("J9").Value
TextBox10.Value = Range("K9").Value
TextBox1.SetFocus
End If
If OptionButton10.Value = True And OptionButton8.Value = True Then
Sheets("Poids").Range("A8").Value = TextBox1.Value
TextBox2.Value = Range("C8").Value
TextBox3.Value = Range("D8").Value
TextBox4.Value = Range("E8").Value
TextBox5.Value = Range("F8").Value
TextBox6.Value = Range("G8").Value
TextBox7.Value = Range("H8").Value
TextBox8.Value = Range("I8").Value
TextBox9.Value = Range("J8").Value
TextBox10.Value = Range("K8").Value
TextBox1.SetFocus
End If
If OptionButton10.Value = True And OptionButton9.Value = True Then
Sheets("Poids").Range("A7").Value = TextBox1.Value
TextBox2.Value = Range("C7").Value
TextBox3.Value = Range("D7").Value
TextBox4.Value = Range("E7").Value
TextBox5.Value = Range("F7").Value
TextBox6.Value = Range("G7").Value
TextBox7.Value = Range("H7").Value
TextBox8.Value = Range("I7").Value
TextBox9.Value = Range("J7").Value
TextBox10.Value = Range("K7").Value
TextBox1.SetFocus
End If
'<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
If OptionButton11.Value = True And OptionButton1.Value = True Then
Sheets("Aire").Range("A13").Value = TextBox1.Value
Range("A13:H13").Activate
Selection.NumberFormat = "0.00"
TextBox2.Value = Range("C13").Value
TextBox3.Value = Range("D13").Value
TextBox4.Value = Range("E13").Value
TextBox5.Value = Range("F13").Value
TextBox6.Value = Range("G13").Value
TextBox7.Value = Range("H13").Value
TextBox1.SetFocus
End If
If OptionButton11.Value = True And OptionButton2.Value = True Then
Sheets("Aire").Range("A12").Value = TextBox1.Value
TextBox2.Value = Range("C12").Value
TextBox3.Value = Range("D12").Value
TextBox4.Value = Range("E12").Value
TextBox5.Value = Range("F12").Value
TextBox6.Value = Range("G12").Value
TextBox7.Value = Range("H12").Value
TextBox1.SetFocus
End If
If OptionButton11.Value = True And OptionButton3.Value = True Then
Sheets("Aire").Range("A11").Value = TextBox1.Value
TextBox2.Value = Range("C11").Value
TextBox3.Value = Range("D11").Value
TextBox4.Value = Range("E11").Value
TextBox5.Value = Range("F11").Value
TextBox6.Value = Range("G11").Value
TextBox7.Value = Range("H11").Value
TextBox1.SetFocus
End If
If OptionButton11.Value = True And OptionButton4.Value = True Then
Sheets("Aire").Range("A10").Value = TextBox1.Value
TextBox2.Value = Range("C10").Value
TextBox3.Value = Range("D10").Value
TextBox4.Value = Range("E10").Value
TextBox5.Value = Range("F10").Value
TextBox6.Value = Range("G10").Value
TextBox7.Value = Range("H10").Value
TextBox1.SetFocus
End If
If OptionButton11.Value = True And OptionButton5.Value = True Then
Sheets("Aire").Range("A9").Value = TextBox1.Value
TextBox2.Value = Range("C9").Value
TextBox3.Value = Range("D9").Value
TextBox4.Value = Range("E9").Value
TextBox5.Value = Range("F9").Value
TextBox6.Value = Range("G9").Value
TextBox7.Value = Range("H9").Value
TextBox1.SetFocus
End If
If OptionButton11.Value = True And OptionButton6.Value = True Then
Sheets("Aire").Range("A8").Value = TextBox1.Value
TextBox2.Value = Range("C8").Value
TextBox3.Value = Range("D8").Value
TextBox4.Value = Range("E8").Value
TextBox5.Value = Range("F8").Value
TextBox6.Value = Range("G8").Value
TextBox7.Value = Range("H8").Value
TextBox1.SetFocus
End If
End Sub
faut'il déclarer des variables à partir de OptionButton ? et comment ?
Merci encore pour l'aide
@+
Nanard
Voici mon problème :
J'ai 13 optionButton que j'utilise dand un USF
Avec un commandButton1, je valide l'opération en cliquant
Quelquefois les informations renvoyées sont justes, d'autres fois les informations renvoyées sont des zéros ou rien !!!!
Je n'y comprend plus rien merci pour l'aide
Mon code est un peu long mais le voici :
Private Sub CommandButton1_Click()
'Bouton 8 Distance
If OptionButton8.Value = True And OptionButton1.Value = True Then
Sheets("Distance").Range("A13").Value = TextBox1.Value
Range("A13:J13").Select
Selection.NumberFormat = "0.00"
TextBox2.Value = Range("C13").Value
TextBox3.Value = Range("D13").Value
TextBox4.Value = Range("E13").Value
TextBox5.Value = Range("F13").Value
TextBox6.Value = Range("G13").Value
TextBox7.Value = Range("H13").Value
TextBox8.Value = Range("I13").Value
TextBox9.Value = Range("J13").Value
TextBox1.SetFocus
End If
If OptionButton8.Value = True And OptionButton2.Value = True Then
Sheets("Distance").Range("A12").Value = TextBox1.Value
TextBox2.Value = Range("C12").Value
TextBox3.Value = Range("D12").Value
TextBox4.Value = Range("E12").Value
TextBox5.Value = Range("F12").Value
TextBox6.Value = Range("G12").Value
TextBox7.Value = Range("H12").Value
TextBox8.Value = Range("I12").Value
TextBox9.Value = Range("J13").Value
TextBox1.SetFocus
End If
If OptionButton8.Value = True And OptionButton3.Value = True Then
Sheets("Distance").Range("A11").Value = TextBox1.Value
TextBox2.Value = Range("C11").Value
TextBox3.Value = Range("D11").Value
TextBox4.Value = Range("E11").Value
TextBox5.Value = Range("F11").Value
TextBox6.Value = Range("G11").Value
TextBox7.Value = Range("H11").Value
TextBox8.Value = Range("I11").Value
TextBox9.Value = Range("J13").Value
TextBox1.SetFocus
End If
If OptionButton8.Value = True And OptionButton4.Value = True Then
Sheets("Distance").Range("A10").Value = TextBox1.Value
TextBox2.Value = Range("C10").Value
TextBox3.Value = Range("D10").Value
TextBox4.Value = Range("E10").Value
TextBox5.Value = Range("F10").Value
TextBox6.Value = Range("G10").Value
TextBox7.Value = Range("H10").Value
TextBox8.Value = Range("I10").Value
TextBox9.Value = Range("J13").Value
TextBox1.SetFocus
End If
If OptionButton8.Value = True And OptionButton5.Value = True Then
Sheets("Distance").Range("A9").Value = TextBox1.Value
TextBox2.Value = Range("C9").Value
TextBox3.Value = Range("D9").Value
TextBox4.Value = Range("E9").Value
TextBox5.Value = Range("F9").Value
TextBox6.Value = Range("G9").Value
TextBox7.Value = Range("H9").Value
TextBox8.Value = Range("I9").Value
TextBox9.Value = Range("J13").Value
TextBox1.SetFocus
End If
If OptionButton8.Value = True And OptionButton6.Value = True Then
Sheets("Distance").Range("A8").Value = TextBox1.Value
TextBox2.Value = Range("C8").Value
TextBox3.Value = Range("D8").Value
TextBox4.Value = Range("E8").Value
TextBox5.Value = Range("F8").Value
TextBox6.Value = Range("G8").Value
TextBox7.Value = Range("H8").Value
TextBox8.Value = Range("I8").Value
TextBox9.Value = Range("J13").Value
TextBox1.SetFocus
End If
If OptionButton8.Value = True And OptionButton7.Value = True Then
Sheets("Distance").Range("A7").Value = TextBox1.Value
TextBox2.Value = Range("C7").Value
TextBox3.Value = Range("D7").Value
TextBox4.Value = Range("E7").Value
TextBox5.Value = Range("F7").Value
TextBox6.Value = Range("G7").Value
TextBox7.Value = Range("H7").Value
TextBox8.Value = Range("I7").Value
TextBox9.Value = Range("J13").Value
TextBox1.SetFocus
End If
'<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
'Bouton 9 Contenance
If OptionButton9.Value = True And OptionButton1.Value = True Then
Sheets("Contenance").Range("A13").Value = TextBox1.Value
Range("A13:H13").Select
Selection.NumberFormat = "0.00"
TextBox2.Value = Range("C13").Value
TextBox3.Value = Range("D13").Value
TextBox4.Value = Range("E13").Value
TextBox5.Value = Range("F13").Value
TextBox6.Value = Range("G13").Value
TextBox7.Value = Range("H13").Value
TextBox1.SetFocus
End If
If OptionButton9.Value = True And OptionButton2.Value = True Then
Sheets("Contenance").Range("A12").Value = TextBox1.Value
TextBox2.Value = Range("C12").Value
TextBox3.Value = Range("D12").Value
TextBox4.Value = Range("E12").Value
TextBox5.Value = Range("F12").Value
TextBox6.Value = Range("G12").Value
TextBox7.Value = Range("H12").Value
TextBox1.SetFocus
End If
If OptionButton9.Value = True And OptionButton3.Value = True Then
Sheets("Contenance").Range("A11").Value = TextBox1.Value
TextBox2.Value = Range("C11").Value
TextBox3.Value = Range("D11").Value
TextBox4.Value = Range("E11").Value
TextBox5.Value = Range("F11").Value
TextBox6.Value = Range("G11").Value
TextBox7.Value = Range("H11").Value
TextBox1.SetFocus
End If
If OptionButton9.Value = True And OptionButton4.Value = True Then
Sheets("Contenance").Range("A10").Value = TextBox1.Value
TextBox2.Value = Range("C10").Value
TextBox3.Value = Range("D10").Value
TextBox4.Value = Range("E10").Value
TextBox5.Value = Range("F10").Value
TextBox6.Value = Range("G10").Value
TextBox7.Value = Range("H10").Value
TextBox1.SetFocus
End If
If OptionButton9.Value = True And OptionButton5.Value = True Then
Sheets("Contenance").Range("A9").Value = TextBox1.Value
TextBox2.Value = Range("C9").Value
TextBox3.Value = Range("D9").Value
TextBox4.Value = Range("E9").Value
TextBox5.Value = Range("F9").Value
TextBox6.Value = Range("G9").Value
TextBox7.Value = Range("H9").Value
TextBox1.SetFocus
End If
If OptionButton9.Value = True And OptionButton6.Value = True Then
Sheets("Contenance").Range("A8").Value = TextBox1.Value
TextBox2.Value = Range("C8").Value
TextBox3.Value = Range("D8").Value
TextBox4.Value = Range("E8").Value
TextBox5.Value = Range("F8").Value
TextBox6.Value = Range("G8").Value
TextBox7.Value = Range("H8").Value
TextBox1.SetFocus
End If
'<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
If OptionButton10.Value = True And OptionButton1.Value = True Then
Sheets("Poids").Range("A15").Value = TextBox1.Value
Range("A15:K15").Select
Selection.NumberFormat = "0.00"
TextBox2.Value = Range("C15").Value
TextBox3.Value = Range("D15").Value
TextBox4.Value = Range("E15").Value
TextBox5.Value = Range("F15").Value
TextBox6.Value = Range("G15").Value
TextBox7.Value = Range("H15").Value
TextBox8.Value = Range("I15").Value
TextBox9.Value = Range("J15").Value
TextBox10.Value = Range("K15").Value
TextBox1.SetFocus
End If
If OptionButton10.Value = True And OptionButton2.Value = True Then
Sheets("Poids").Range("A14").Value = TextBox1.Value
TextBox2.Value = Range("C14").Value
TextBox3.Value = Range("D14").Value
TextBox4.Value = Range("E14").Value
TextBox5.Value = Range("F14").Value
TextBox6.Value = Range("G14").Value
TextBox7.Value = Range("H14").Value
TextBox8.Value = Range("I14").Value
TextBox9.Value = Range("J14").Value
TextBox10.Value = Range("K14").Value
TextBox1.SetFocus
End If
If OptionButton10.Value = True And OptionButton3.Value = True Then
Sheets("Poids").Range("A13").Value = TextBox1.Value
TextBox2.Value = Range("C13").Value
TextBox3.Value = Range("D13").Value
TextBox4.Value = Range("E13").Value
TextBox5.Value = Range("F13").Value
TextBox6.Value = Range("G13").Value
TextBox7.Value = Range("H13").Value
TextBox8.Value = Range("I13").Value
TextBox9.Value = Range("J13").Value
TextBox10.Value = Range("K13").Value
TextBox1.SetFocus
End If
If OptionButton10.Value = True And OptionButton4.Value = True Then
Sheets("Poids").Range("A12").Value = TextBox1.Value
TextBox2.Value = Range("C12").Value
TextBox3.Value = Range("D12").Value
TextBox4.Value = Range("E12").Value
TextBox5.Value = Range("F12").Value
TextBox6.Value = Range("G12").Value
TextBox7.Value = Range("H12").Value
TextBox8.Value = Range("I12").Value
TextBox9.Value = Range("J12").Value
TextBox10.Value = Range("K12").Value
TextBox1.SetFocus
End If
If OptionButton10.Value = True And OptionButton5.Value = True Then
Sheets("Poids").Range("A11").Value = TextBox1.Value
TextBox2.Value = Range("C11").Value
TextBox3.Value = Range("D11").Value
TextBox4.Value = Range("E11").Value
TextBox5.Value = Range("F11").Value
TextBox6.Value = Range("G11").Value
TextBox7.Value = Range("H11").Value
TextBox8.Value = Range("I11").Value
TextBox9.Value = Range("J11").Value
TextBox10.Value = Range("K11").Value
TextBox1.SetFocus
End If
If OptionButton10.Value = True And OptionButton6.Value = True Then
Sheets("Poids").Range("A10").Value = TextBox1.Value
TextBox2.Value = Range("C10").Value
TextBox3.Value = Range("D10").Value
TextBox4.Value = Range("E10").Value
TextBox5.Value = Range("F10").Value
TextBox6.Value = Range("G10").Value
TextBox7.Value = Range("H10").Value
TextBox8.Value = Range("I10").Value
TextBox9.Value = Range("J10").Value
TextBox10.Value = Range("K10").Value
TextBox1.SetFocus
End If
If OptionButton10.Value = True And OptionButton7.Value = True Then
Sheets("Poids").Range("A9").Value = TextBox1.Value
TextBox2.Value = Range("C9").Value
TextBox3.Value = Range("D9").Value
TextBox4.Value = Range("E9").Value
TextBox5.Value = Range("F9").Value
TextBox6.Value = Range("G9").Value
TextBox7.Value = Range("H9").Value
TextBox8.Value = Range("I9").Value
TextBox9.Value = Range("J9").Value
TextBox10.Value = Range("K9").Value
TextBox1.SetFocus
End If
If OptionButton10.Value = True And OptionButton8.Value = True Then
Sheets("Poids").Range("A8").Value = TextBox1.Value
TextBox2.Value = Range("C8").Value
TextBox3.Value = Range("D8").Value
TextBox4.Value = Range("E8").Value
TextBox5.Value = Range("F8").Value
TextBox6.Value = Range("G8").Value
TextBox7.Value = Range("H8").Value
TextBox8.Value = Range("I8").Value
TextBox9.Value = Range("J8").Value
TextBox10.Value = Range("K8").Value
TextBox1.SetFocus
End If
If OptionButton10.Value = True And OptionButton9.Value = True Then
Sheets("Poids").Range("A7").Value = TextBox1.Value
TextBox2.Value = Range("C7").Value
TextBox3.Value = Range("D7").Value
TextBox4.Value = Range("E7").Value
TextBox5.Value = Range("F7").Value
TextBox6.Value = Range("G7").Value
TextBox7.Value = Range("H7").Value
TextBox8.Value = Range("I7").Value
TextBox9.Value = Range("J7").Value
TextBox10.Value = Range("K7").Value
TextBox1.SetFocus
End If
'<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
If OptionButton11.Value = True And OptionButton1.Value = True Then
Sheets("Aire").Range("A13").Value = TextBox1.Value
Range("A13:H13").Activate
Selection.NumberFormat = "0.00"
TextBox2.Value = Range("C13").Value
TextBox3.Value = Range("D13").Value
TextBox4.Value = Range("E13").Value
TextBox5.Value = Range("F13").Value
TextBox6.Value = Range("G13").Value
TextBox7.Value = Range("H13").Value
TextBox1.SetFocus
End If
If OptionButton11.Value = True And OptionButton2.Value = True Then
Sheets("Aire").Range("A12").Value = TextBox1.Value
TextBox2.Value = Range("C12").Value
TextBox3.Value = Range("D12").Value
TextBox4.Value = Range("E12").Value
TextBox5.Value = Range("F12").Value
TextBox6.Value = Range("G12").Value
TextBox7.Value = Range("H12").Value
TextBox1.SetFocus
End If
If OptionButton11.Value = True And OptionButton3.Value = True Then
Sheets("Aire").Range("A11").Value = TextBox1.Value
TextBox2.Value = Range("C11").Value
TextBox3.Value = Range("D11").Value
TextBox4.Value = Range("E11").Value
TextBox5.Value = Range("F11").Value
TextBox6.Value = Range("G11").Value
TextBox7.Value = Range("H11").Value
TextBox1.SetFocus
End If
If OptionButton11.Value = True And OptionButton4.Value = True Then
Sheets("Aire").Range("A10").Value = TextBox1.Value
TextBox2.Value = Range("C10").Value
TextBox3.Value = Range("D10").Value
TextBox4.Value = Range("E10").Value
TextBox5.Value = Range("F10").Value
TextBox6.Value = Range("G10").Value
TextBox7.Value = Range("H10").Value
TextBox1.SetFocus
End If
If OptionButton11.Value = True And OptionButton5.Value = True Then
Sheets("Aire").Range("A9").Value = TextBox1.Value
TextBox2.Value = Range("C9").Value
TextBox3.Value = Range("D9").Value
TextBox4.Value = Range("E9").Value
TextBox5.Value = Range("F9").Value
TextBox6.Value = Range("G9").Value
TextBox7.Value = Range("H9").Value
TextBox1.SetFocus
End If
If OptionButton11.Value = True And OptionButton6.Value = True Then
Sheets("Aire").Range("A8").Value = TextBox1.Value
TextBox2.Value = Range("C8").Value
TextBox3.Value = Range("D8").Value
TextBox4.Value = Range("E8").Value
TextBox5.Value = Range("F8").Value
TextBox6.Value = Range("G8").Value
TextBox7.Value = Range("H8").Value
TextBox1.SetFocus
End If
End Sub
faut'il déclarer des variables à partir de OptionButton ? et comment ?
Merci encore pour l'aide
@+
Nanard