[VB6] Write to file text


Deskripsi
    Write to file with format text using VB 6

Howto

    Dim sFileText As String
    Dim iFileNo As Integer
 
    iFileNo = FreeFile
    'open the file for writing
    Open "D:\myfile.txt" For Output As #iFileNo
    'please note, if this file already exists it will be overwritten!

    'write some example text to the file
    Print #iFileNo, "My String 1 Here"
    Print #iFileNo, "My String 2 Here"
 
    'close the file (if you dont do this, you wont be able to open it again!)
    Close #iFileNo

*Tips : you can change the extension file :)

Post a Comment

Harap gunakan bahasa yang baik dan sopan, terima kasih