|
-
Jul 27th, 2006, 06:29 PM
#1
Thread Starter
Hyperactive Member
User Type
Hi all,
I am trying to declare a variable
VB Code:
Dim fs As New Scripting.FileSystemObject
However, I am getting an error: User Type Not Defined
Could someone help me with what reference I need to be using to solve this problem.
Khanjan
Hey... If you found this post helpful please rate it.

-
Jul 27th, 2006, 06:30 PM
#2
Re: User Type
Microsoft Scripting Runtime.
-
Jul 27th, 2006, 06:43 PM
#3
Re: User Type
Additionaly, you should not implicitly Define the variable (fs) with the New keyword.
Instead, to be able to release the object, do:
VB Code:
Option Explicit
Private Sub Form_Load()
Dim fs As Scripting.FileSystemObject
Set fs = [b]New[/b] Scripting.FileSystemObject
'Do stuff
Set fs = Nothing
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|