Bonjour à tous,
Voici un petit bout de code qui est censé, du moins c'est mon objectif, récupérer le label des ckecbox qui ont été cochés en utilisant mon USF pour les reporter les uns à la suite des autres dans la cellule M de la feuille concernée.
Bien entendu çà ne fonctionne pas
Pour seul résultat j'obtiens 10 "FAUX" alors que je peux cocher au maximum 11 checkbox!!!
'
'|***************************************************************************|
'| BOUTON CmdVALIDER Signale les oublis dans la FrmUSTENSILES. |
'|***************************************************************************|
'
If Chk1 = False And Chk2 = False And Chk3 = False And Chk4 = False And Chk5 = False And Chk6 = False And Chk7 = False And Chk8 = False And Chk9 = False And Chk10 = False And Chk11 = False Then
MsgBox ("Vous oubliez de renseigner la rubrique : USTENSILES. Sélectionnez UNE ou PLUSIEURS CASES")
Exit Sub
End If
'
'|***************************************************************************|
'| TRANSFERT DES DONNÉES DANS LA FEUILLE DE CALCUL |
'|***************************************************************************|
'
If Chk1.Value = True Then Chk1.Value = "TOTO1-"
If Chk2.Value = True Then Chk2.Value = "TOTO2-"
If Chk3.Value = True Then Chk3.Value = "TOTO3-"
If Chk4.Value = True Then Chk4.Value = "TOTO4-"
If Chk5.Value = True Then Chk5.Value = "TOTO5-"
If Chk6.Value = True Then Chk6.Value = "TOTO6-"
If Chk7.Value = True Then Chk7.Value = "TOTO7-"
If Chk8.Value = True Then Chk8.Value = "TOTO8-"
If Chk9.Value = True Then Chk9.Value = "TOTO9-"
If Chk10.Value = True Then Chk10.Value = "TOTO10-"
If Chk11.Value = True Then Chk11.Value = "TOTO11-"
.
.
.
num = Sheets("NOUVELLE").Range("A65536").End(xlUp).Row + 1
Sheets("NOUVELLE").Activate
Range("M" & num).Value = (Chk1.Value) & "" & (Chk2.Value) & "" & (Chk3.Value) & "" & (Chk4.Value) & "" & (Chk5.Value) & "" & (Chk6.Value) & "" & (Chk7.Value) & "" & (Chk8.Value) & "" & (Chk9.Value) & "" & (Chk10.Value) & "" & (Chk11.Value)
***********************************************************
Qui pourra me venir en aide? Mon programme est pratiquement terminé et je coince sur ce dernier point qui m'empêche de l'utiliser.
Par avance MERCI MERCI
Voici un petit bout de code qui est censé, du moins c'est mon objectif, récupérer le label des ckecbox qui ont été cochés en utilisant mon USF pour les reporter les uns à la suite des autres dans la cellule M de la feuille concernée.
Bien entendu çà ne fonctionne pas
Pour seul résultat j'obtiens 10 "FAUX" alors que je peux cocher au maximum 11 checkbox!!!
'
'|***************************************************************************|
'| BOUTON CmdVALIDER Signale les oublis dans la FrmUSTENSILES. |
'|***************************************************************************|
'
If Chk1 = False And Chk2 = False And Chk3 = False And Chk4 = False And Chk5 = False And Chk6 = False And Chk7 = False And Chk8 = False And Chk9 = False And Chk10 = False And Chk11 = False Then
MsgBox ("Vous oubliez de renseigner la rubrique : USTENSILES. Sélectionnez UNE ou PLUSIEURS CASES")
Exit Sub
End If
'
'|***************************************************************************|
'| TRANSFERT DES DONNÉES DANS LA FEUILLE DE CALCUL |
'|***************************************************************************|
'
If Chk1.Value = True Then Chk1.Value = "TOTO1-"
If Chk2.Value = True Then Chk2.Value = "TOTO2-"
If Chk3.Value = True Then Chk3.Value = "TOTO3-"
If Chk4.Value = True Then Chk4.Value = "TOTO4-"
If Chk5.Value = True Then Chk5.Value = "TOTO5-"
If Chk6.Value = True Then Chk6.Value = "TOTO6-"
If Chk7.Value = True Then Chk7.Value = "TOTO7-"
If Chk8.Value = True Then Chk8.Value = "TOTO8-"
If Chk9.Value = True Then Chk9.Value = "TOTO9-"
If Chk10.Value = True Then Chk10.Value = "TOTO10-"
If Chk11.Value = True Then Chk11.Value = "TOTO11-"
.
.
.
num = Sheets("NOUVELLE").Range("A65536").End(xlUp).Row + 1
Sheets("NOUVELLE").Activate
Range("M" & num).Value = (Chk1.Value) & "" & (Chk2.Value) & "" & (Chk3.Value) & "" & (Chk4.Value) & "" & (Chk5.Value) & "" & (Chk6.Value) & "" & (Chk7.Value) & "" & (Chk8.Value) & "" & (Chk9.Value) & "" & (Chk10.Value) & "" & (Chk11.Value)
***********************************************************
Qui pourra me venir en aide? Mon programme est pratiquement terminé et je coince sur ce dernier point qui m'empêche de l'utiliser.
Par avance MERCI MERCI