Insert Line To File
'Insert the following code to your form:
Private Sub Form_Load()
'Replace 'c:\autoexec.bat' with the name of the file you want to
edit.
Open "c:\autoexec.bat" For Append As #1
'Replace 'dir *.*' with the line you want to insert to the file.
Print #1, "dir *.*"
Close #1
End Sub