Click here to Skip to main content
15,868,440 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
VB
set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFile = objFSO.CreateTextFile("C:\output.txt", True)

    Dim temp, key
    temp = "mon pass"
    key = "qswx"
    temp = Encrypt(temp,key)

    Function encrypt(Str, key)
     ..........

     ......

     Next
     encrypt = Newstr
    End Function

   objFile.WriteLine temp 'Error 800A0005 - Invalid procedure call or argument


When i us
VB
WScript.Echo temp

work perfectly

what to do to save the result?
Posted

1 solution

See http://stackoverflow.com/questions/17094281/getting-invalid-procedure-call-or-argument-in-vbscript[^]

This is because you have encrypted the value into something that .WriteLine can't write to the file.
 
Share this answer
 
Comments
malak ivona 6-Jun-15 22:19pm    
thank you
ZurdoDev 6-Jun-15 22:20pm    
You're welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900