fso - Microsoft Scripting Runtime Reference not working

lydiapenrose

New Member
Joined
Nov 7, 2011
Messages
22
Hello!
I have some code written that used to work fine in Excel 2007 once I added the Microsoft Scripting Runtime Reference. However, it is now giving me the same RunTime Error 5 with the debugger pointing me to this line of code:
Set FSfolder = FS.GetFolder(sFolderPath)

Is there another reference that contains the File Search capability?
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
However, it is now ...

Hi

What is "now"? What is your excel version?

You don't give us information to understand what's happening.

About the variables FS, FSFolder, sFolderPath, post the

- declaration
- initialisation
- the value of sFolderPath when the statement you post is executed
 
Last edited:
Upvote 0
No problem. I'm glad you figured it out.

The guidelines I posted are, however, valid for future posts. Always post your excel version, and declaration, initialisation and values of the variables in the code you post.
 
Upvote 0

Forum statistics

Threads
1,214,923
Messages
6,122,289
Members
449,077
Latest member
Rkmenon

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