Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reference to Microsoft Scripting Runtime not working

Status
Not open for further replies.

theomen

Programmer
Jun 2, 2004
158
GB
I'm trying to write a small application that will simply check if there are any files in a certain folder. If any files are found, it will do some processing on them and then move them into a backup folder.

However, I'm receiving an error saying that the type "FileSystemObject" is undefined.

I've gone to Projects > Add Reference, and added "Microsoft Scripting Runtime" from the COM list. I've clicked select and its put it into the bottom box. However, when I go back in to the Projects > Add Reference, its no longer listed, so it seems its not adding the reference at all.

Any ideas where I'm going wrong?
 
Looks to me like you're using VB.Net as apposed to VB.

You might get better answers in the .Net Forum Forum796

From what I know about .Net, when you add a rtefernce it appears in the Refernces nodes of the Project Explorer.

As for the use of FSO, I've not used .Net enough to tell you why that's not working. From what I can see you may have to declare it like
Code:
Dim FSO As Scripting.FileSystemObject
You might want to verify these points in the VB.Net forum (link above).

Hope this helps

HarleyQuinn
---------------------------------
Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top