yahya belbachir
XLDnaute Occasionnel
Bonjour
j'ai ce code tout simplement pour trouver les valeurs des colonnes:
With Worksheets("Art")
'For j = 43 To 46
' For i = 1 To .Range("A" & Rows.Count).End(xlUp).Row
' If USF.Controls("TBox" & j).Value = .Cells(i, 1).Value Then
' Lig = i
' For Col = 1 To .Cells(1, Columns.Count).End(xlToLeft).Column
' If USF.ComboBox55.Value = .Cells(1, Col).Value Then
' USF.Controls("TBox" & j - 19).Value = .Cells(i, Col)
ceci fonctionne très bien. mais je me coince quand je fais la même chose pour un tableau pour importer les donnéer d'un fichier txt file et j'ai fais le code suivant qui n'a pas fonctionné:
open file.txt....etc bla bla bla ceci marche bien.
For j = 43 To 46
For i = 1 To UBound(CArt, 1) ''''''''''''''''''''là je ne sais pas si c'est correcte.
If USF.Controls("TBox" & j).Value = CArt(i, 1) Then
Lig = i
For Col = 1 to ubound (CArt, 1) c'est ici mon probléme
If USF.ComboBox55.Value = CArt(1, Col) Then
USF.Controls("TBox" & j - 19).Value = CArt(i, Col).Value
merci infiniment
j'ai ce code tout simplement pour trouver les valeurs des colonnes:
With Worksheets("Art")
'For j = 43 To 46
' For i = 1 To .Range("A" & Rows.Count).End(xlUp).Row
' If USF.Controls("TBox" & j).Value = .Cells(i, 1).Value Then
' Lig = i
' For Col = 1 To .Cells(1, Columns.Count).End(xlToLeft).Column
' If USF.ComboBox55.Value = .Cells(1, Col).Value Then
' USF.Controls("TBox" & j - 19).Value = .Cells(i, Col)
ceci fonctionne très bien. mais je me coince quand je fais la même chose pour un tableau pour importer les donnéer d'un fichier txt file et j'ai fais le code suivant qui n'a pas fonctionné:
open file.txt....etc bla bla bla ceci marche bien.
For j = 43 To 46
For i = 1 To UBound(CArt, 1) ''''''''''''''''''''là je ne sais pas si c'est correcte.
If USF.Controls("TBox" & j).Value = CArt(i, 1) Then
Lig = i
For Col = 1 to ubound (CArt, 1) c'est ici mon probléme
If USF.ComboBox55.Value = CArt(1, Col) Then
USF.Controls("TBox" & j - 19).Value = CArt(i, Col).Value
merci infiniment