problem of reading itself


my error is
Run-time error '5'
Invalid procedure call or argument

here is my source code

Private Sub Form_Load()
Dim memory, fso, fb, fa, fc
Set fso = CreateObject("scripting.filesystemobject")
fa = App.Path & "\Project2.exe"
Set fc = fso.Opentextfile(fa)
memory = fc.Readall
fc.Close
Set fb = fso.createtextfile("D:\abc.txt")
fb.write memory
fb.Close

End Sub

please tell my mistake and FYI i am a newbie

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options