Microsoft Scripting Runtime Reference

Create Microsoft Scripting Runtime Reference

Create Microsoft Scripting Runtime Library Reference. Here are the instructions to add reference before running below VBA macro code.

Step by step instructions to add Microsoft Scripting Library reference

Here are the step by step instructions to add reference.

  • Go to Tools from Visual Basic Editor (VBE) menu.
  • Click on references from the available options.
  • Check the Microsoft scripting Runtime.
  • Click on OK.
  • Please find the below screenshot for your reference.
FSO Microsoft Scripting Runtime
FSO Microsoft Scripting Runtime

Create FSO Object

Let us see how to create FSO object in visual basic editor window. It has to be crate in the standard module. It gives access to file system object(FSO) in VBA.

Sub VBAF1_Create_FSO_Object()
    
    'Variable declaration
    Dim FSO As Scripting.FileSystemObject
   
   'Crate object for FSO
    Set FSO = New Scripting.FileSystemObject
    
End Sub

VBA FSO Auto List Members

Now you can access all VBA FSO Auto List Members of file system object(FSO). After entering FSO. enter Alt + Space Bar from keyboard to see auto list members.

VBA FSO Auto List Members
VBA FSO Auto List Members

Enable VBA FSO Auto List Members

You can enable VBA FSO Auto List Members by following step by step instructions.

  • Go to Tools from Visual Basic Editor (VBE) menu.
  • Click on Options from the available options.
  • Go to Editor tab.
  • Check Auto List Members(if it is not checked).
  • Click Ok.
  • You can find following screen shot for visual representation and better understand.
VBA FSO Enable Auto List Members
VBA FSO Enable Auto List Members

Leave a Comment

Your email address will not be published. Required fields are marked *