Solved

What do I need to reference to access the FSO?

Posted on 2003-11-23
9
341 Views
Last Modified: 2010-05-01
I am using Visual Basic 6.0, and am wanting to use a file system object to read the contents of a text file into a string.

However, fileSystemObject is not in my 'list' of objects.

I am assuming I need to reference a dll to allow this, can anyone help here?

Thanks,
cassandra.
0
Comment
Question by:calebS
  • 6
  • 3
9 Comments
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 9808136
Yes. Go to Project > Reference.

Form the list select "Window Scripting Host"
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 9808145
Sorry! That'l be "Microsoft Scripting Runtime"
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 9808149
Obejct module name is scrrun.dll and its located in the system32 folder in your windows home folder. If its not available in teh list, try browsing to it and selecting it manually.
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 1

Author Comment

by:calebS
ID: 9808174
windows scripting? Am I to assume by the name this is not the type of module that I want to be using in a desktop application?
0
 
LVL 19

Accepted Solution

by:
RanjeetRain earned 125 total points
ID: 9808188
Please ignore the first comment.

Set a reference to "Microsoft Scripting Runtime". Obejct module name is scrrun.dll and its located in the system32 folder in your windows home folder. If its not available in teh list, try browsing to it and selecting it manually.

0
 
LVL 1

Author Comment

by:calebS
ID: 9808209
I will, (and the points are yours)  but my question stands (if you don't mind me asking), is the scripting runtime designed for scripting, is it what I should be using in a desktop application?
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 9808222
No. That is a generic TERM used to describe this. "Window Scripting Host" is kinda an application which can be used from VB using the "Microsoft Scripting Runtime" library.
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 9808231
Let me be more clear. In your application you will be referencing  "Microsoft Scripting Runtime", which actually is "Window Scripting Host".
0
 
LVL 1

Author Comment

by:calebS
ID: 9808242
okay thanks..
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

774 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