定义fso是这样的:Set fs = CreateObject("Scripting.FileSystemObject")
那么变量fs就被定义为fso变量,就可以用.getdrive等属性了。

解决方案 »

  1.   

    将Dim fso As New FileSystemObject改为 Dim fso As New Script.FileSystemObject
      

  2.   

    写掉了几个字
    Dim fso As New FileSystemObject改为 Dim fso As New Scripting.FileSystemObject 
      

  3.   

    to:zklove(花花公子):
    好象还不行。
    User defined typed not defined
      

  4.   

    to:e_zhima
    老兄,fs可以直接用了?不用在定义或者赋值了?
      

  5.   

    引用后,把Dim fso As New FileSystemObject改为:set fs = new filesystemobject
      

  6.   

    用鼠标点"Projects"菜单,选"reference"项,在打开的对话框中选中"Microsoft Scripting Runtime"
    赶快给分!!!