Hi,
Try something like this,
filefree = FreeFile
Open textbox1.text + textbox2.text For Output As #filefree
Print #filefree, textbox3.text
Print #filefree, textbox4.text
Print #filefree, "Device = " + textbox5.text 'example
Close #filefree
Have textbox1 as your Path eg 'C:\my documents'
Have textbox2 as your filename eg. 'autoexec.bat'
Put this on an event such as a button click or form close etc.
Hope it works
regards