*************************************************
Re salut, j'ai ceci comme fichier texte, je veux le mettre dans un MsFlexGrid, seulement j'ai un probleme dans mon script, je sais c'est surement con, mais je viens de commencer en Vb (depuis lundi seulement)
*************************************************
Open "c:\test2.txt " For Input As #2
Line Input #2, var
Dim var As String
Dim strTab() As String
Do While Not (EOF(1) = True)
Input #2, var
strTab = Split(",")
Loop
For i = 1 To 50 'Parcourt les lignes
Tableau.Row = i
For j = 1 To 10 'Parcourt les colonnes
Tableau.Col = j
Input #1, var
Tableau.Text = var
Next j
Next i
Close #1
************************************************
Si jamais qq un peux m'aider, merci!!!!!!!!!
crocmorts
Messages postés49Date d'inscriptionmardi 17 février 2004StatutMembreDernière intervention 6 avril 2004 18 févr. 2004 à 14:17
Private Sub Form_Load()
Dim var As String
Dim strTab() As String
Open "c:\test.txt " For Input As #1
essai.Row = 0
Line Input #1, var
Do While Not (EOF(1) = True)
Line Input #1, var
strTab = Split(var, ",")
For j = 0 To UBound(strTab) Step 1 'Parcourt les colonnes
essai.Col = j
essai.Text = strTab(j)
Next j
'essai.Rows = essai.Rows + 1
essai.Row = essai.Row + 1
Loop
End Sub
Voila, j'ai trouvé, mais il n'y a qu'une seule erreur, il ne voit pas la tte premiere ligne.