> Open "MyOutput" & Format(Date, "yyyymmdd") & ".txt" For Output As #1
I don't see anything wrong with that line (well, except that you hard-coded
the #1 instead of using the FreeFile function, but that wouldn't stop the
line from working unless channel #1 were still open from a previous call to
the Open statement), although I would always include the path with the
filename. You say it crashed... describe the crash in more detail
(especially if there were any error messages generated).
Rick
> Hello
>
[quoted text clipped - 33 lines]
> Many thanks
> tp
teepee - 15 Apr 2008 20:57 GMT
> I don't see anything wrong with that line (well, except that you
> hard-coded the #1 instead of using the FreeFile function, but that
> wouldn't stop the line from working unless channel #1 were still open from
> a previous call to the Open statement), although I would always include
> the path with the filename. You say it crashed... describe the crash in
> more detail (especially if there were any error messages generated).
Wow this is weird. Suddenly it's working for me too? Must have been operator
error. Sorry
However when I try
Open "MyOutput" & Format(Date, "yyyymmdd") & Format(Time, "hhmmss") &
".txt" For Output As #1
I get syntax error
teepee - 15 Apr 2008 21:12 GMT
> However when I try
>
> Open "MyOutput" & Format(Date, "yyyymmdd") & Format(Time, "hhmmss") &
> ".txt" For Output As #1
>
> I get syntax error
Ah got it.
Open "MyOutput" & Format(Date, "dd-mm-yy") + "_" + Format(Time, "hh-mm-ss")
& ".txt" For Output As #1
Thanks for all your help
tp
Dave Peterson - 15 Apr 2008 22:05 GMT
Or
Open "MyOutput" & Format(now, "dd-mm-yy_hh-mm-ss") & ".txt" For Output As #1
> > However when I try
> >
[quoted text clipped - 11 lines]
>
> tp

Signature
Dave Peterson
The code works on my PC. give the following filename
MyOutput20080415.txt
> Hello
>
[quoted text clipped - 33 lines]
> Many thanks
> tp