Is there something that I need to reference? How do I use this:
Dim fso As New FileSystemObject
Dim fld As Folder
Dim ts As TextStream
I am getting an error because it does not recognize these objects.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Within Excel you need to set a reference to the VBScript run-time library.
The relevant file is usually located at
\Windows\System32\scrrun.dllVisual Basic Editor (ALT+F11)
Microsoft Scripting Runtime‘scrrun.dllfile will be displayed below the listboxThis can also be done directly in the code if access to the VBA object model has been enabled.
Access can be enabled by ticking the check-box
Trust access to the VBA project object modelfound at File > Options > Trust Center > Trust Center Settings > Macro SettingsTo add a reference:
To remove a reference: