'Step 1 - Declare variable
Dim filenum1 As Integer
'Step 2 - Create and open text file for append on the local hard drive
filenum1 = Freefile
Open "C:\TEXTFILE.TXT" For Append As filenum1
'Step 3 - Write a line to the text file (value1, 2, 3, etc... are the values you want to write delimited by a comma)
Write #filenum1 , value1, value2, value3, value4
'Step 4 - Closes the text file
Close filenum1