Bonjour à vous
j'ai un problème sur la compréhension de ma variable tableau. j'utilisais ce code mais ça chargeait lentement
j'ai décidé de passer par la variable tableau mais ma feuille ne reçoit pas la recherche des données
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 Counter = 0 Clé = TextBox1 Set ws = Workbooks("HL School Management.xlsm").Sheets("Test") 'If Not ws.ListObjects(1).DataBodyRange Is Nothing Then ws.ListObjects(1).DataBodyRange.Delete With Workbooks("HLSM DataBase.xlsm").Sheets("Base élèves") For Xlignes = 7 To .Cells(Rows.Count, "F").End(xlUp).Row If .Cells(Xlignes, "F") Like Clé Then Counter = Counter + 1 For col=2 to 6 ws.Cells(Counter + 11, Col + 2) = .Cells(Xlignes, Col) ws.Cells(Counter + 11, "I") = .Cells(Xlignes, "N") & " ans" Next End If Next End with
merci de m'aider
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
16 Counter = 0 Clé = TextBox1 Set ws = Workbooks("HL School Management.xlsm").Sheets("Test") 'If Not ws.ListObjects(1).DataBodyRange Is Nothing Then ws.ListObjects(1).DataBodyRange.Delete With Workbooks("HLSM DataBase.xlsm").Sheets("Base élèves") For Xlignes = 7 To .Cells(Rows.Count, "F").End(xlUp).Row If .Cells(Xlignes, "F") Like Clé Then Counter = Counter + 1 ReDim Preserve Tablo(6, Counter) For Col = 2 To 6 Tablo(Col, Counter) = .Cells(Xlignes, Col) Next End If Next ws.Cells(Counter + 11, Col + 2) = Tablo End with
Partager