can anyone help?
Why don't you specify the fully qualified path where you want to write the file rather than try and figure out where its going to write it?
If you get the answer to your question, please mark it as the answer.
From the MSDN docs:
<i>The path parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see GetCurrentDirectory.</i>
I now have the following code and it creates the file but does not write to it.....does anyone know why?
DimFILE_NAME As String = "C:\colourhead\pallingtest" & newsId & ".txt"
If System.IO.File.Exists(FILE_NAME) = True Then
MsgBox("file already exists")
System.IO.File.Create("C:\colourhead\pallingtest" & newsId & ".txt")
Dim objWriter As New System.IO.StreamWriter(FILE_NAME)
objWriter.Write("come on sucker")
MsgBox("Text written to file")