making a vb form that saves data to txt and html files?

av3ng3dwarri0r

New member
im making a visual basic that just collects information and saves it to txt or html files. you enter the info and hit save. that simple. ive got all the input fields made and all the labels done but im not sure how to code it due to the fact im a noob in vb. im learning though but i just need some help. whats the easiest way to get this done?
 
you can write basically on any file type if you want

i dont know what you mean by vb but if its VB.net

you can do it using a StreamReader or StreamWriter

Dim oFile as System.IO.File
Dim Writer as System.IO.StreamWriter
Writer = oFile.CreateText(“C:\text.dll”)
Writer.WriteLine(“text")
Writer.Close()

always close the streamwriter or else the file will be inaccessible

as for VB 6 refer to the site below..
 
Back
Top