barski Posted July 17, 2003 Posted July 17, 2003 I've working on creating export files with minimal success. I wrote a really simple routine and I keep getting an access to path is denied Dim flwriter As StreamWriter Dim i As Long flwriter = File.CreateText("c:\jmyfile.txt") For i = 1 To 10 flwriter.WriteLine(i) Next i flwriter.Close() Any help would be appreciated Quote
a_jam_sandwich Posted July 17, 2003 Posted July 17, 2003 To use the streamwriter you first need to create a new instance of it before writing to. where you declare the streamwriter replace with this Dim flwriter As New IO.StreamWriter("c:\jmyfile.txt") and remove line 3 'flwriter = File.CreateText("c:\jmyfile.txt")' Now it should work Andy Quote Code today gone tomorrow!
barski Posted July 18, 2003 Author Posted July 18, 2003 Still getting the access to path denied error. Quote
*Gurus* Derek Stone Posted July 18, 2003 *Gurus* Posted July 18, 2003 You need to set write permissions on the server. Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.