To create and write a textfile in VBA you can use the following snippet.
This should also work when using VB6.
Sample VBA
Dim fso as Object
Dim oFile as Object
Set fso = CreateObject("Scripting.FileSystemObject")
Set oFile = FSO.CreateTextFile("C:\Users\Codesnippets\Desktop\Test.txt")
oFile.WriteLine "This is a sample line!"
oFile.Close
Set fso = Nothing
Set oFile = Nothing
RT @CodeSnippetsNET: How to create and write a textfile in #VBA http://t.co/TbsOKKoeBH #vb #vb6 #programming #code #coding