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

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
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,214,649
Messages
6,120,733
Members
448,987
Latest member
marion_davis

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