Bonjour à tous,

J'ai le code suivant :

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
way = Workbooks(ActiveWorkbook.name).FullName
way2 = Workbooks(ActiveWorkbook.name).name
way_user = Replace(way, "\" & way2, "\Reco.txt")
User = (Environ("USERNAME"))
date_t = (Day(Now) & "\" & Month(Now) & "\" & Year(Now))
Horloge = Format(Now, "hh:mm:ss")
 
chn = "|" & name_stock & "|" & isin_stock & "|" & user_name & "|" & (Day(Now) & "." & Month(Now) & "." & Year(Now)) & "|" & Mid(way_user, 3)
 
 
Dim intFic As Integer
 
intFic = FreeFile
Open way_user For Append As intFic
Print #intFic, chn
Close intFic
Il fonctionne très bien à la premiere utilisation ( la chaine de caractere chn s'affiche dans le fichier txt mais quand j'essaye de relancer la macro plus rien ne s'ecrit dans le fichier text. Je n'arrive vraiment pas a comprendre pourquoi.
Auriez vous une explication ?
MErci