VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Write a line into the text file using VB

by Bhuwan Chand Joshi (69 Submissions)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 2nd May 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Write a line into the text file using VB

API Declarations


Dim Obj as Object
Dim F1 as Object
Dim varArr as Variant


Rate Write a line into the text file using VB




On error goto Err_Handler

varArr=Array("Hello","Iam","Bhuwan")
set Obj=CreateObject("Scripting.FileSystemObject")
set F1=Obj.CreateTextFile(App.Path & "\Testing.txt")
F1.writeline varArray(0) & " " & varArray(1) & " " & varArray(2)
F1.Close

Err_Handler:
     MsgBox Err.Description

End Sub

Download this snippet    Add to My Saved Code

Write a line into the text file using VB Comments

No comments have been posted about Write a line into the text file using VB. Why not be the first to post a comment about Write a line into the text file using VB.

Post your comment

Subject:
Message:
0/1000 characters