Hello,

I'm trying to write some TEXT in a text file using EXCEL VBA

My file is created correctly but I can't write any text in.

My code is:

Open strDestFile For Output As #iFileNum
' If an error occurs report it and end.
If Err <> 0 Then
MsgBox "Cannot open filename " & strDestFile
End

'write " HELLO WORLD"
Write #iFileNum, "HELLO WORLD"

Close #iFileNum

Any idea ?