VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Open a text file for writing

by Bhuwan Chand Joshi (69 Submissions)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 21st July 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Open a text file for writing

Rate Open a text file for writing



'Make a reference to a Microsoft Scripting Runtime Library

Public sub Form_Load()

Dim fso As New FileSystemObject
Dim F As Object
Set F = fso.OpenTextFile("D:\Test.txt", ForWriting)
F.Write "Hello World"
F.Close

End Sub

'This program writes "Hello World" into the text file Test.txt" 


Download this snippet    Add to My Saved Code

Open a text file for writing Comments

No comments have been posted about Open a text file for writing. Why not be the first to post a comment about Open a text file for writing.

Post your comment

Subject:
Message:
0/1000 characters