sub Exporttexte()
numfic = FreeFile()
Dim LeTexte As String
Dim lignelue As Integer
Open "temporaire.txt" For Output As #numfic
With ActiveSheet
lignelue = 1
While Not IsEmpty(.Cells(lignelue, 1))
LeTexte = "X" & .Cells(lignelue, 1) & "Y" & .Cells(lignelue, 2)
Print #numfic, LeTexte
lignelue = lignelue + 1
Wend
Close #numfic ' Ferme le fichier.
End With
end sub