Solved

FileSystemObject

Posted on 2001-08-04
6
129 Views
Last Modified: 2010-05-02
I'm new to VB.  I've been writing VBScripting for a few however.  My question is what component do I add to my project to be able to use the FileSystemObject?
0
Comment
Question by:raizon
  • 4
  • 2
6 Comments
 
LVL 6

Accepted Solution

by:
JonFish85 earned 75 total points
ID: 6352713
Project -> References -> Microsoft Scripting Runtime


hope this helps!
0
 
LVL 6

Expert Comment

by:JonFish85
ID: 6352714
Then use something like this:

Dim fs As New FileSystemObject

'code here

set fs = nothing
0
 
LVL 6

Expert Comment

by:JonFish85
ID: 6352717
alternativly you can go:

Dim fs As Object

Set fs = CreateObject("Scripting.FileSystemObject")
'Stuff
Set fs = Nothing

but this is using "late binding" which is slower... Microsoft suggests using early binding, as in example above...
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 5

Author Comment

by:raizon
ID: 6352720
Great.  Thats exactly what I needed.  I had the early binding set.  Which I'm glad that you posted that cause it confirmed that I was doing it correctly.

Thanks again
0
 
LVL 6

Expert Comment

by:JonFish85
ID: 6352724
glad to be of service!
0
 
LVL 5

Author Comment

by:raizon
ID: 6352726
Good luck on your MCSD.  

0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now