View Single Post
  #1 (permalink)  
Old July 31st, 2003, 10:58 AM
savoym savoym is offline
Friend of Wrox
 
Join Date: Jun 2003
Posts: 119
Thanks: 0
Thanked 1 Time in 1 Post
Default HELP with .VBS file

I am writing a .vbs file and the highlighted part of my function code below is not working. The error that I am getting is "PATH NOT FOUND". What am I doing wrong? Here is the code (THANKS):

Function LogErrorToFile ()
    Dim objFS
    Dim objFile

    LogErrorToFile = False

    Set objFS = WScript.CreateObject("Scripting.FileSystemObject")

    If strYear + strMonth + strDay <> strDate Then
        Set objFile = objFS.CreateTextFile (strFile, False)
    Else
        Set objFile = objFS.OpenTextFile (strFile, 8, True) End If
Reply With Quote