Home > Technology > FileSystemObject in Visual Basic 6.0

FileSystemObject in Visual Basic 6.0

When you tried to declare Dim fso as FileSystemObject in your code and you get an error, most probably the only thing you need to do is go to Project > References. At the list of the available references, scroll down to ‘Microsoft Scripting Runtime (scrrun.dll)’ make sure it is checked (right symbol at the checkbox), and click OK.

Your code should be able to use FileSystemObject by now.

Again, hope it helps somebody.

Categories: Technology
  1. maximo
    July 19, 2008 at 3:07 am | #1

    try to use:
    dim fso as new filesystemobject

    - or -

    dim fso as filesystemobject

    and then

    set fso=new filesystemobject

    of course the ‘Microsoft Scripting Runtime’ has to be checked in the reference

  2. imin83
    July 23, 2008 at 7:49 am | #2

    hi maximo, thanx for the suggestion

  3. MUHAYIMANA CLEMENT
    January 8, 2009 at 8:40 am | #3

    I was really helped by this advice! Keep it up I appreciated so much!

  4. Alibi
    February 11, 2009 at 6:20 am | #4

    What for do we use FileSystemObject

  1. No trackbacks yet.