Hello all
I am trying to make a module that creates a file ,and I have collected sample script, but it does not appear to be working, but looking at the code, you would think it would work..
Heres the code
and here is the error
referring to oWrite and oRead
Thank you!!!
Mike Kovacic
I am trying to make a module that creates a file ,and I have collected sample script, but it does not appear to be working, but looking at the code, you would think it would work..
Heres the code
Code:
Dim oFile As System.IO.File
Dim oWrite As System.IO.StreamWriter
Dim oRead As System.IO.StreamReader
oWrite = oFile.CreateText(“C:\sample.txt”)
OpenText
oRead = oFile.OpenText(“C:\sample.txt”)
oWrite.WriteLine(“Write a line to the file”)
oWrite.WriteLine() ‘Write a blank line to the file
oWrite.WriteLine(“{0,10}{1,10}{2,25}”, “Date”, “Time”, “Price”)
oWrite.WriteLine(“{0,10:dd MMMM}{0,10:hh:mm tt}{1,25:C}”, Now(), 13455.33)
oWrite.Close()
and here is the error
Code:
Declaration expected.
Thank you!!!
Mike Kovacic