Discuss Component/Reference for FileSystemObject in the Visual Basic Programming forum on ASP Free. Component/Reference for FileSystemObject Visual Basic Programming forum discussing coding strategies, development and techniques. Go from prototype to product quickly using this robust platform.
Posts: 29
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>
Posts: 450
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>