|
-
Nov 1st, 2000, 05:00 AM
#1
Thread Starter
Hyperactive Member
I am looking after a new application written with VBA for access which has these lines in it.
gen declarations
Private Const IMASPRODUCTIONASCIIFILE As String = "ImasProd.dat"
Private Const FTPDIR As String = "c:\ftp60\"
sub to write to file
Open FTPDIR & IMASPRODUCTIONASCIIFILE For Output As #1
the open line is where it bombs out. The ftp60 dir is there on the PC but the dir does not contain the ImasProd.dat file prior to the running of the program. I thought that the prog would automatically create the file if it does not exist already. Is this not the case ?
Any comments or help would be great.
Many thanx
locutus
-
Nov 1st, 2000, 05:15 AM
#2
Fanatic Member
?
Works for me - sure you are not using #1 anywhere else?
Strange one,
Paul.
Not nearly so tired now...
Haven't been around much so be gentle...
-
Nov 1st, 2000, 08:00 AM
#3
Lively Member
You might try assigning a variable name to the keyword FreeFile, e.g.
intModelFile = FreeFile
Open strModel For Output As #intModelFile
Do stuff here.......
Close #intModelFile
FreeFile automatically finds the next available file for input, output, append, etc. Be sure that you close the file when you're through with it.
-
Nov 1st, 2000, 09:03 AM
#4
Thread Starter
Hyperactive Member
thanks , prob solved
cheers guys problem solved , much appreciated
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
|