Creating a text file
Creating a text file
Rate Creating a text file
(2(2 Vote))
Public sub Form_Load()
On error goto Err_Handler
Dim Obj as Object
Dim F1 as Object
Dim varArray as Variant
varArr=Array("Hello","MySelf","Bhuwan")
Set Obj=CreateObject("Scripting.FileSystemObject")
Set F1=Obj.CreateTextFile("Specify the path where you need to create text file like D:\Test.txt")
F1.writeline varArray(0) & " " & varArray(1) & " " & varArray(2)
F1.Close
Err_Handler:
MsgBox Err.Description
End Sub
'This program creates a text file Text.txt in the drive "D:"
Creating a text file Comments
No comments yet — be the first to post one!
Post a Comment