Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old March 11th, 2005, 01:15 AM
thayalan44 thayalan44 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 29 thayalan44 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 10 m 55 sec
Reputation Power: 0
Component/Reference for FileSystemObject

Can you please tell me the Component or the Reference that is need to use FileSystemObject?
When I tried to run the VB Codes shown below, I get an Error Message which says User-defined Type not defined and pointing to the Code Number 2. Therefore, I think a Component or a Reference has to be selected.

<Code>
1 Private Sub Command1_Click()
2 Dim fso As New FileSystemObject
3
4 Set fso = CreateObject("Scripting.FileSystemObject")
5
6 If (Not fso.FolderExists("d:/PatientsRecords")) Then
7 fso.CreateFolder ("d:/PatientsRecords")
8 End If
9 End Sub
</Code>

Reply With Quote
  #2  
Old March 11th, 2005, 05:43 AM
hithere's Avatar
hithere hithere is offline
Learner
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Location: India
Posts: 450 hithere User rank is Sergeant (500 - 2000 Reputation Level)hithere User rank is Sergeant (500 - 2000 Reputation Level)hithere User rank is Sergeant (500 - 2000 Reputation Level)hithere User rank is Sergeant (500 - 2000 Reputation Level)hithere User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 Days 12 h 13 m 21 sec
Reputation Power: 17
In the References, set the Microsoft Scripting Runtime. This will solve ur problem

Quote:
Originally Posted by thayalan44
Can you please tell me the Component or the Reference that is need to use
FileSystemObject?
When I tried to run the VB Codes shown below, I get an Error Message which says User-defined Type not defined and pointing to the Code Number 2. Therefore, I think a Component or a Reference has to be selected.

<Code>
1 Private Sub Command1_Click()
2 Dim fso As New FileSystemObject
3
4 Set fso = CreateObject("Scripting.FileSystemObject")
5
6 If (Not fso.FolderExists("d:/PatientsRecords")) Then
7 fso.CreateFolder ("d:/PatientsRecords")
8 End If
9 End Sub
</Code>
Comments on this post
thayalan44 disagrees: It was helpful

Reply With Quote
  #3  
Old March 11th, 2005, 06:17 AM
thayalan44 thayalan44 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 29 thayalan44 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 10 m 55 sec
Reputation Power: 0
Thank You, hithere

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Component/Reference for FileSystemObject


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway