|
-
July 10th, 2001, 05:02 PM
#1
"Class does not support Automation"
Hi,
I am getting "Class does not support Automation or does not support expected
interface" when I try to create "Scripting.FileSystemObject". Any
resolution?
Thanks,
-
July 10th, 2001, 07:21 PM
#2
Re: "Class does not support Automation"
Here is a sample that does work. Make sure there is a REFERENCE to "Microsoft Scripting Runtime"
option Explicit
Dim FilSysObj as Scripting.FileSystemObject
Dim DriveCollection as Drives
Dim objDrive as Drive
private Sub Main()
set FilSysObj = new Scripting.FileSystemObject
set DriveCollection = FilSysObj.Drives
for Each objDrive In DriveCollection
If objDrive.IsReady then
MsgBox objDrive & " " & objDrive.AvailableSpace
End If
next
End Sub
private Sub Form_Load()
me.Show
Main
End Sub
John G
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
|