Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 11-11-2003, 02:21 PM   #1
Member (9 bit)
 
darkside's Avatar
 
Join Date: Jul 2003
Location: Sheffield, UK
Posts: 292
Help with VB for a newb

Private Sub Command1_Click()

Dim fso As New Scripting.FileSystemObject
Set fs = New Scripting.FileSystemObject
If fs.FileExists(Text1.Text & Text2.Text) Then
MsgBox ("The file was found")
Else
MsgBox ("The file was not found")
End If

End Sub


What is wrong with this? I get an error when i click on the button that says 'user defined type not defined' and it highlights fso As New Scripting.FileSystemObject.

Any help appreciated
darkside is offline   Reply With Quote
Old 11-12-2003, 08:02 AM   #2
Professional gadfly
 
doctorgonzo's Avatar
 
Join Date: Jan 2002
Location: Minneapolis, MN
Posts: 6,364
Send a message via MSN to doctorgonzo
You have to add a reference for the project. Should be under Tools...References or Project...References or something like that. Up will pop a list of libraries you can link to. I am guessing that you need to put a check next to "Microsoft Scripting" because you are trying to use Scripting objects.
doctorgonzo is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 08:09 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2