Affichage dans Combo

jorisphi

XLDnaute Occasionnel
Bonjour à tous

J’aimerai que mes 5 combos « Déroulement Leçons » m’affichent les 10 Etapes de ma Leçon
Je donne plus de détails dans mon fichier en annexe


Encore un tout grand Merci pour votre aide

Très Cordialement
Jorisphi
 

Pièces jointes

  • JDC (RechecheLeçons)(Int)(2).zip
    23.3 KB · Affichages: 34
Dernière édition:

Papou-net

XLDnaute Barbatruc
Re : Affichage dans Combo

Bonjour jorisphi,

Il te suffit de modifier comme suit :

- Lignes en bleu à créer
- Lignes en rouge à supprimer

Code:
Private Sub ListBox1_Click()
Dim x As Long
x = CLng(ListBox1.List(ListBox1.ListIndex, 1))
With Sheets("Création")
     TextBox1 = .Cells(x, 6)
     TextBox2 = .Cells(x, 3)
     TextBox3 = .Cells(x, 4)
     TextBox4 = .Cells(x, 5)
     TextBox5 = .Cells(x, 2)
[COLOR="Red"][B]'     ComboBox5.RowSource = Range("G" & x & ":P" & x).Address
'     ComboBox6.RowSource = Range("G" & x & ":P" & x).Address
'     ComboBox7.RowSource = Range("G" & x & ":P" & x).Address
'     ComboBox8.RowSource = Range("G" & x & ":P" & x).Address
'     ComboBox9.RowSource = Range("G" & x & ":P" & x).Address[/B][/COLOR]
[COLOR="Blue"][B]    For ctl = 5 To 9
      Me.Controls("ComboBox" & ctl).Clear
      For cl = 7 To 16
        Me.Controls("ComboBox" & ctl).AddItem Cells(x, cl)
      Next
    Next[/B][/COLOR]
    ComboBox10 = .Cells(x, 12)
    ComboBox11 = .Cells(x, 13)
End With

End Sub

Espérant avoir aidé.

Cordialement.
 

jorisphi

XLDnaute Occasionnel
Re : Affichage dans Combo

Bonjour Papounet, bonjour le Forum

Vous m'aviez bien aidé et je vous en remercie encore
Puis-je vous solliciter encore une fois, car j'y "perd mon latin"
J'ai incorporé mon usf dans mon projet et... il ne me propose plus rien dans mes combos
Pourtant, c'est le même code
Je n'y comprends plus rien

Puis-je vous demander de me mettre sur la voie pour que cela fonctionne ?
Je joins mon fichier en annexe
Grand MERCI d'avance
Cordialment
Jorisphi
Bonjour jorisphi,

Il te suffit de modifier comme suit :

- Lignes en bleu à créer
- Lignes en rouge à supprimer

Code:
Private Sub ListBox1_Click()
Dim x As Long
x = CLng(ListBox1.List(ListBox1.ListIndex, 1))
With Sheets("Création")
     TextBox1 = .Cells(x, 6)
     TextBox2 = .Cells(x, 3)
     TextBox3 = .Cells(x, 4)
     TextBox4 = .Cells(x, 5)
     TextBox5 = .Cells(x, 2)
[COLOR="Red"][B]'     ComboBox5.RowSource = Range("G" & x & ":P" & x).Address
'     ComboBox6.RowSource = Range("G" & x & ":P" & x).Address
'     ComboBox7.RowSource = Range("G" & x & ":P" & x).Address
'     ComboBox8.RowSource = Range("G" & x & ":P" & x).Address
'     ComboBox9.RowSource = Range("G" & x & ":P" & x).Address[/B][/COLOR]
[COLOR="Blue"][B]    For ctl = 5 To 9
      Me.Controls("ComboBox" & ctl).Clear
      For cl = 7 To 16
        Me.Controls("ComboBox" & ctl).AddItem Cells(x, cl)
      Next
    Next[/B][/COLOR]
    ComboBox10 = .Cells(x, 12)
    ComboBox11 = .Cells(x, 13)
End With

End Sub

Espérant avoir aidé.

Cordialement.
 

Pièces jointes

  • JDCTest(Charg)(Usf2)(0)(4.2)(testUsf2)(2010-04-28).zip
    23.7 KB · Affichages: 43

jorisphi

XLDnaute Occasionnel
Re : Affichage dans Combo

Bonjour Bebere,papounet

Merci pour votre aide

Je viens d'essayer et il me donne "erreur de compilation"
Que faire ? car je ne trouve pas
Cordialement
Jorisphi

"manque le point devant cells
Me.Controls("ComboBox" & ctl).AddItem Cells(x, cl) "
 

Statistiques des forums

Discussions
312 520
Messages
2 089 292
Membres
104 089
dernier inscrit
salimgtu