I have the following code giving me an error:
It'll perform the first WriteLine fine, but after that, it crashes when trying to perform the second WriteLine. I get an "Object reference not set to an instance of an object."
Any ideas?
Code:
dim myStringArr(2) as String
FileOpen(1,"C:\File1.txt",OpenMode.Input,OpenAccess.Read,OpenShare.Default)
FileOpen(3,"C:\Result.txt",OpenMode.Output,OpenAccess.Write,OpenShare.Default)
myStringArr = LineInput(1).Split(",")
WriteLine(3,myStringArr(0))
myStringArr = LineInput(1).Split(",")
WriteLine(3,myStringArr(0))
It'll perform the first WriteLine fine, but after that, it crashes when trying to perform the second WriteLine. I get an "Object reference not set to an instance of an object."
Any ideas?