Connecting Tech Pros Worldwide Forums | Help | Site Map

VBScript problem processing txt file with a function.

Newbie
 
Join Date: Sep 2007
Posts: 2
#1: Sep 25 '09
Hello experts (bow),

In the code snippet below, I am getting an "Expected End Of Statement" error that is pointing to the middle of the name of the function. Specifically the "c" in fnMaxiclean. Any help is greatly appreciated. I have triple-checked that there are no spelling errors.

Expand|Select|Wrap|Line Numbers
  1. '' Open the file
  2.     Set objFile = objFSO.OpenTextFile(strFileName, ForReading)
  3.  
  4. '' Clean the file line-by-line
  5.     Do Until objFile.AtEndOfStream
  6.         strText = objFile.ReadLine
  7.         strNText = strNText & fnMaxiclean strText
  8.         strText = ""
  9.     Loop
  10.  
  11. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  12. '' Write out to new file
  13.     Set objFile = objFSO.CreateTextFile(strNewFileName)
  14.  
  15. '' populate contents of new file
  16.     objFile.WriteLine strNText
  17.  
  18. '' close the new file
  19.     objFile.Close
Thank you,
Jeff

Newbie
 
Join Date: Sep 2009
Posts: 1
#2: Sep 28 '09

re: VBScript problem processing txt file with a function.


I suppose you should write:
strNText = strNText & fnMaxiclean (strText)

John Clayton - Adersoft
Need a good VBScript editor? Try VbsEdit
Reply