|
-
Aug 22nd, 2002, 09:29 AM
#1
Thread Starter
Fanatic Member
File Error - Help [Resolved]
I have the following code -
VB Code:
'format time
Today = Format(Now, "mm/dd/yyyy")
'format output file name
outFile = "graybar-po-" & Today & ".dat"
badPO = "graybar-BADpo-" & Today & ".txt"
'open newly created graybar csv file and take it from there
Open "c:\winnt\profiles\desktop\graybarTemp.csv" For Input As #1
Open "c:\winnt\profiles\desktop\" & outFile For Output As #4 '<----------This is the error line
Open "c:\winnt\profiles\desktop\" & badPO For Output As #5
I get the "Path Not Found" error on both the Open for Output lines. I have virtually the same code in many app's. What am I missing?!?!?!? I don't see my error.
Thanks in advance -
Last edited by demotivater; Aug 22nd, 2002 at 10:44 AM.
-
Aug 22nd, 2002, 09:34 AM
#2
Addicted Member
Filenames can't have /'s in them...
Computer /nm./: a device designed to speed and automate errors
-
Aug 22nd, 2002, 09:37 AM
#3
Thread Starter
Fanatic Member
ARGH!!!
Yea, I have the same code in many apps except I don't format the time with "/" in those!!!
*kicks self*
Thanks for the extra eyes!
-
Aug 22nd, 2002, 09:40 AM
#4
Hyperactive Member
He seems right about that, it works if you change the file name to somethng simpler, but you left out the username in the path between 'profiles' and 'desktop', or at least on my nt box that's the path
-
Aug 22nd, 2002, 10:44 AM
#5
Thread Starter
Fanatic Member
He was right. It was because I formatted the time as ##/##/###. Can't have the /'s. Switched it to -'s and it works fine. Dumb mistake, but aren't they all??
Thanks guys
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|