Hi masters,

I try to write and read file into txt file but i dont know how to do it.
Anyone know how to achieve this?

Please help me.
any help will appreciated much.

Best Regards

Recommended Answers

All 3 Replies

See this thread

See this thread

Thank you.
How about write it?

Best regards

See If This Helps :

An example of writing a file:
Dim sFileText as String
Dim iFileNo as Integer
iFileNo = FreeFile
'open the file for writing
Open "D:\Test.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, "first line of text"
Print #iFileNo, " second line of text"
Print #iFileNo, "" 'blank line
Print #iFileNo, "some more text!"

'close the file (if you dont do this, you wont be able to open it again!)
Close #iFileNo
commented: Really a Vig Help +1
commented: Nice :D +3
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.