cs_choumi92
Messages postés4Date d'inscriptionvendredi 4 juin 2004StatutMembreDernière intervention11 juin 2004
-
11 juin 2004 à 08:57
cs_choumi92
Messages postés4Date d'inscriptionvendredi 4 juin 2004StatutMembreDernière intervention11 juin 2004
-
11 juin 2004 à 16:33
1) je me positionne sur une cellule vide de feuille.xls
2) j execute le programme VBA pour exploiter un autre fichier ( ici = UC4.txt) c est ok jusqu'à apparition du resultat avec msgbox
3) mais : je n'arrive pas à coller le resultat dans feuille.xls
ci dessous mon source :
Sub usedby()
'
'
Workbooks.OpenText FileName:="C:\UC432.30\UC432.63e\Bin\UC4.txt", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, _
Comma:=False, Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), _
Array(2, 1))
Dim tableau(), Namej
nb_lignes = Range("a1").End(xlDown).Row
ReDim tableau(nb_lignes, 3)
For lignes = 2 To nb_lignes If lignes 2 Then resultat " utilisés par : "
If tableau(lignes, 1) <> "0" Then
Namej = Cells(lignes, 1)
Namej = Mid(Namej, 12, 7)
Typej = Cells(lignes, 3) Used Typej & " " & Namej
resultat = resultat & " / " & Used
End If
Next lignes
MsgBox resultat