ré-initialiser plusieurs combobox à l'aide d'un bouton

SuperBZH

XLDnaute Nouveau
Bonjour,
je suis nouveau sur ce forum. Dans l'optique de développer un fichier de comptage des points au poker chinois je me trouve devant une "petite" difficulté.
A la fin, d'une main, je voudrais ré-initialiser l'ensemble des combobox de la page à leurs valeurs par défaut ("0" ou "Main"), le tout en cliquant sur un seul bouton de contrôle (voir fichier image joint).
Voici ce que j'ai pondu comme macro associée au bouton "raz" (qui ne fonctionne pas...) :

Sub raz()
J1J2H.Text = 0 ' 1ère syntaxe essayée
Set J1J2M.ListIndex = 2 ' 2ème syntaxe essayée
Set J1J2B.ListIndex = 2
Set J1J3H.ListIndex = 2
Set J1J3M.ListIndex = 2
Set J1J3B.ListIndex = 2
Set J1J4H.ListIndex = 2
Set J1J4M.ListIndex = 2
Set J1J4B.ListIndex = 2
Set J2J3H.ListIndex = 2
Set J2J3M.ListIndex = 2
Set J2J3B.ListIndex = 2
Set J2J4H.ListIndex = 2
Set J2J4M.ListIndex = 2
Set J2J4B.ListIndex = 2
Set J3J4H.ListIndex = 2
Set J3J4M.ListIndex = 2
Set J3J4B.ListIndex = 2
Set HJ1.Value = "Main" ' 3ème syntaxe essayée
Set MJ1.Value = "Main"
Set BJ1.Value = "Main"
HJ2.Value = "Main" ' 4ème syntaxe essayée
MJ2.Value = "Main"
BJ2.Value = "Main"
HJ3.Value = "Main"
MJ3.Value = "Main"
BJ3.Value = "Main"
HJ4.Value = "Main"
MJ4.Value = "Main"
BJ4.Value = "Main"
End Sub

Merci d'avance pour votre aide
 

Pièces jointes

  • Capture Excel.jpg
    Capture Excel.jpg
    43.2 KB · Affichages: 75
  • Capture Excel.jpg
    Capture Excel.jpg
    43.2 KB · Affichages: 94
  • Capture Excel.jpg
    Capture Excel.jpg
    43.2 KB · Affichages: 87

Statistiques des forums

Discussions
312 088
Messages
2 085 201
Membres
102 816
dernier inscrit
bolivier