I have found with Boston that there is no need to "create globally"... what I am doing, based on their recommendations is as follows:
Step One:
Open "C:\DailyFiles\FTPLog.txt" For Append As #100
Step Five:
Print #100, Now(); " * Incremental file set not complete", Tab
** "Tab" means to enter to next line in the text file
Step 10
Close #100
This works really well and allows me to write information into my text
files easily. On a side note, it also allows me to have multiple files
open at once. For example, I have a script that writes information into
three separate files at the same time with Append as #100, Append as
#200 and Append as #300.
Kim Scaccia, System Admin
Recovery Reimbursement
Patient Business & Financial Services
Halifax Medical Center
386-226-4590 opt 1 ext 2018
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Lawrence,
Mitchell
Sent: Tuesday, January 29, 2008 12:16 PM
To: [email protected]
Subject: RE: [Talk] CreateObject questions.
Rules based?
If so, I believe you will need to declare "a" (poor choice for a
variable name IMHO) globally so that it's value remains sub to sub.
Might need to do "fs" also, but not sure.
Thank you,
Mitch Lawrence
Lead Applications Analyst
Technical Support - NPR/Automation
CHRISTUS Information Management
*: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
Send a "thank you
<http://intranet.christushealth.org/spiritBuck/Default.asp> " to
someone!
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bennett, Brian
Sent: Tuesday, January 29, 2008 10:45 AM
To: '[email protected]'
Subject: [Talk] CreateObject questions.
Morning all.
If I do the following in step 1:
Set fs = CreateObject ("Scripting.FilesystemObject")
Set a = fs.CreateTextFile ("c:\logs\somefilename.txt", True)
And then in step 2:
a.WriteLine ("Some text goes here")
a.WirteLine ("Some more text goes here")
I get an error in step 2 since I have left the sub in step 1. Do I need
to Dim a as ?, or do I need to set a= fs before I can write to a, for
each step that I need to write to?
Thanks.
Brian Bennett
Affinity Health Systems
PBS\Clinic Billing
(920)628-9055
[EMAIL PROTECTED]
<<image002.jpg>>
