Bonjour!
Alors voila, je commence sur Vba et je rencontre un problème. J'ai fais une List Box et j'aimerai y afficher le contenu de cellules d'un autre document excel.... mais c'est un échec pour le moment et je comprend pas pourquoi.
Voici mes lignes de code:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 Private Sub Affiche_LstEtudiants() Dim ZoneEtudiant As Range Dim Ligne As Range With Workbooks("QCM_ClasseurEnseignant").Worksheets("Etudiants") .Activate Set ZoneEtudiant = .Range("DebZon_BaseEtudiant").CurrentRegion.Offset(1, 0) For Each Ligne In ZoneEtudiant.Rows If Cells(Ligne.Row, 2) <> "" Then LstEtudiants.AddItem Cells(Ligne.Row, 2) & " " & Cells(Lignes.Row, 3).Value Else Exit For End If Next Ligne End With End Sub
Quelqu'un pourrait m'aider?
Un grand merci d'avance!
Partager