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
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