Login | |
|
 |
Re: Writing to a text file (should be easy...) - 7/29/2004 1:22:20 AM
|
|
 |
|
| |
mbouchard
Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
Some things that look wrong to me. 1-Right before you get to the commented text you set this. Set oFSO = GetObject("WinNT://" & sServer & "/LanmanServer") 2-Use this line several places Set oFso = CreateObject("Scripting.FileSystemObject") 3-Line where you get your error, you are passing oFSO to the writelog sub but right before you are setting oFSO to #1 and are using oFileObject to open the text file. Call WriteLog(sLog, sLogMessage, oFSO) 4-This is set inside of createlog, do not think it is ever dim'd Set oFileObject = CreateObject("Scripting.FileSystemObject") Some recomendations: - Set oFSO at the top of the script when you dim it ex., remove from all subs/functions and pass it like you are doing with the writelog sub. Dim oFSO : Set oFso = CreateObject("Scripting.FileSystemObject") -Change this to something else. Set oFSO = GetObject("WinNT://" & sServer & "/LanmanServer") -Use oFSO instead of oFileObject.
|
|
| |
|
|
|
 |
Re: Writing to a text file (should be easy...) - 7/30/2004 7:38:42 AM
|
|
 |
|
| |
mbouchard
Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
Glad I can help.
|
|
| |
|
|
|
|
|