I'm a little surprised that it complains about adding
newObjects.utilctls.SFMain" twice under different object names, but you don't
need to do that to create two files.
I'd do it like this:
AddObject "newObjects.utilctls.SFMain", "fs" 'parentheses aren't needed here,
btw
Set file = fs.OpenFile("\Documents and Settings\AcuTrack\icMaster.txt")
Set file2 = fs.OpenFile (outName)
Do you see what I'm getting at? One SFMain object can create more than one
OpenFile object, all at the same time as far as I know.
--- In [email protected], "georgeewalters" <gwalt...@...> wrote:
>
> At the top of the program I have this:
>
> AddObject("newObjects.utilctls.SFMain"), "input"
> AddObject("newObjects.utilctls.SFRecord"), "icmaRec"
> Set file = input.OpenFile("\Documents and Settings\AcuTrack\icMaster.txt")
>
> and later I need to write stuff done to an output file and have this code:
>
> outName = "\Documents and Settings\AcuTrack\StockCount.txt"
>
> AddObject("newObjects.utilctls.SFMain"), "output"
> If output.exists(outName) Then
> Set file2 = output.OpenFile(outName)
> Else
> Set outfile = output.CreateFile(outName)
> Set file2 = output.OpenFile (outName)
> End If
>
> It complains that the object "newObjects ....." already exists. I don't
> understand. Can I not open another file?
>
--
You received this message because you are subscribed to the Google Groups
"nsb-ce" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nsb-ce?hl=en.