If you are needing to save a variable to disk as a file, add this function to your project (cut & paste) and then use the example below for how to call it.
Private Function SaveFile(txtFile, ByVal MyText As String)
Dim FileNum As Integer
FileNum = FreeFile()
Open txtFile For Output As FileNum
Print #FileNum, MyText;
Close FileNum
End Function
Say your variable containing data you want saved was named
You would use like so:
SaveFile "D:\File.txt", strVarA
You do not need to use a variable in place of strVarA, you can just put the text you want to save inside of quotes.
SaveFile "D:\File.txt", "This is the contents of File.txt"