FileSystemObject Intellisense

sdday81

New Member
Joined
Feb 28, 2014
Messages
25
How can I get the intellisense to show up when working with the FileSystemObject? I went to tools->References and checked the box to include "Microsoft Scripting Runtime". I only need to include it in the references correct? I created a FSO and then tried doing FSO. and no methods or properties were showing up. I tried pressing ctrl+space to see if it would force the intellisense, but no luck. Is there something else I need to include in my code or reference?

Code:
    ' Create & Set File Sytem Ojbect (Part of MS Scripting Library)
    Dim FSO
    Set FSO = CreateObject("Scripting.FileSystemObject")
    
    Dim fsoFolder, fsoFiles, fsoFile
    Dim szFileList As String
    'Get the folder where files are located
    Set fsoFolder = FSO. 'IT'S RIGHT HERE WHERE I REALIZED INTELLISENSE WAS NOT SHOWING
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Declare as the correct FSO data type:
Code:
    Dim FSO As Scripting.FileSystemObject
    Dim fsoFolder As Folder
    Dim fsoFiles As Files
    
    'Set FSO = CreateObject("Scripting.FileSystemObject")
    Set FSO = New Scripting.FileSystemObject
 
Upvote 0
You are awesome! Thanks!!! That's what I get trying to read through the MSDN, sometimes the examples are terrible. On the MSDN they were declaring everything without types (Variants)
 
Upvote 0

Forum statistics

Threads
1,215,051
Messages
6,122,871
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top