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

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
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,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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