how to change vb output to text file and print that

Submitted by maddyrafi on
Hai Sir: is this correct sourcecode to change the vb output to text file. in vb, pls tel, and what is the app.path in this code describe me pls. and explain this coding me pls Dim sFile As String Dim sText As String Dim iFileNum As Integer sFile = App.Path & "\mydata.txt" 'to save to a file iFileNum = FreeFile Open sFile For Output As #iFileNum Print #iFileNum, Text1.Text Close #iFileNum