Error on creating a text file to write lines
From: JenHu (jenniferhu46_at_hotmail-dot-com.no-spam.invalid)
Date: 01/06/05
- Next message: Steve C. Orr [MVP, MCSD]: "Re: check if excel installed"
- Previous message: Diffident: "can anyone answer this tuff question?"
- Next in thread: Marina: "Re: Error on creating a text file to write lines"
- Reply: Marina: "Re: Error on creating a text file to write lines"
- Messages sorted by: [ date ] [ thread ]
Date: 6 Jan 2005 14:56:11 -0600
Hi all,
I want to create a text file to write lines, but it gives me an error
on Dim sw As New StreamWriter(CreatePath & Efilename) :
System.IO.IOException: The process cannot access the file
"C:\temp\DD_01062005.txt" because it is being used by another
process.
Can someone point me out where did I do wrong? Thanks.
------------------------------------------------------------------
Dim CreatePath As String = "C:\temp\"
Dim Efilename As String = "DD_" & Format(Date.Today,
"MMddyyyy").ToString & ".txt"
File.Create(CreatePath & Efilename)
Dim sw As New StreamWriter(CreatePath & Efilename)
*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
- Next message: Steve C. Orr [MVP, MCSD]: "Re: check if excel installed"
- Previous message: Diffident: "can anyone answer this tuff question?"
- Next in thread: Marina: "Re: Error on creating a text file to write lines"
- Reply: Marina: "Re: Error on creating a text file to write lines"
- Messages sorted by: [ date ] [ thread ]