Microsoft 365 Remplir Combobox pas les 12 mois

iliess

XLDnaute Occasionnel
Bonjour
SVP je souhaite remplir un combobox1 pas les 12 mois au demarage du Userform1
merci
J'ai essayer avec ce code mais ca marche pas
VB:
Private Sub UserForm_Initialize()
Me.ComboBox1.List = Array(jan, fev, mars, avr, mai, juin, juil, aout, sept, Oct, nov, dec)
Me.ComboBox1.DropDown
End Sub
 

Pièces jointes

  • Remplir Combobox pas les 12 mois .xlsm
    20.8 KB · Affichages: 4
Solution
Bonjour iliess,

ton fichier en retour ; clique sur le bouton OK. :)



code VBA de UserForm1 (11 lignes) :

VB:
Private Sub cmdVld_Click()
  With ComboBox1
    If .ListIndex > -1 Then MsgBox .Value
  End With
  Unload Me: ActiveCell.Select
End Sub

Private Sub UserForm_Initialize()
  ComboBox1.List = Array("jan", "fév", "mars", "avr", "mai", _
    "juin", "juil", "août", "sept", "oct", "nov", "déc")
End Sub

soan

soan

XLDnaute Barbatruc
Inactif
Bonjour iliess,

ton fichier en retour ; clique sur le bouton OK. :)



code VBA de UserForm1 (11 lignes) :

VB:
Private Sub cmdVld_Click()
  With ComboBox1
    If .ListIndex > -1 Then MsgBox .Value
  End With
  Unload Me: ActiveCell.Select
End Sub

Private Sub UserForm_Initialize()
  ComboBox1.List = Array("jan", "fév", "mars", "avr", "mai", _
    "juin", "juil", "août", "sept", "oct", "nov", "déc")
End Sub

soan
 

Pièces jointes

  • Remplir Combobox pas les 12 mois .xlsm
    23.8 KB · Affichages: 3

Discussions similaires

Réponses
9
Affichages
472
Réponses
13
Affichages
1 K

Statistiques des forums

Discussions
312 215
Messages
2 086 326
Membres
103 180
dernier inscrit
Vcr