You need to Set txtfile and txtstream, they are object references.i.e.Set txtfile = Fso.CreateTextFile("D:\desktop. VisualBasic namespace to easily create a comma-delimited file that contains text fields enclosed in quotes we will also see how to use the PrintLine function. Hi I want to create and write a text file using file system object in VB6.How can i do this.I tried some code,but it gives error while creation.Dim Fso As New FileSystemObject Dim txtfile As File Dim txtstream As TextStream txtfile = Fso.CreateTextFile("D:\desktop.txt") txtstream = txtfile.OpenAsTextStream("D:\desktop.txt", 2) txtstream.WriteLine ("hello") txtstream.Close Fso = NothingBut i got an error,obect variable or block variable not set.Please give me solutionMamatha If Response vbNo Then Exit Sub End If Open 'E:MultimediaDocumentsMarcoSDDAssignmentUsers' & MyName & '. We've got lots of great SQL ServerĮxperts to answer whatever question you can come up with.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |