Solved

What do I need to reference to access the FSO?

Posted on 2003-11-23
9
338 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
 
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
using Access 8 53
Run code from text file in vb 1 34
Copy a row 12 53
Visual Studio 2005 text editor 10 23
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

744 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

16 Experts available now in Live!

Get 1:1 Help Now