为什么我的判断语句if会出错:
 Dim fs As New FileSystemObject
 If fs.FolderExists(Trim(text1.Text)) = False Then
    MsgBox 。。
    Exit Sub
 End If错误是:
Run-time error'429'
ActiveX component can't create object是不是我的机器要设置什么东西?

解决方案 »

  1.   

    可能你的filesystemboject许可信息不全或引用错误造成不可创建对象。
      

  2.   

    工程/引用/Microsoft scripting runtime
      

  3.   

    工程->引用,选中 "Misrosoft Scripting Runtime"
      

  4.   

    Set fs = CreateObject("Scripting.FileSystemObject") If fs.FolderExists(Trim(text1.Text)) = False Then
        MsgBox 。。
        Exit Sub
     End If
      

  5.   

    如果你有关norton防毒的话
    scripting block不要勾选
      

  6.   

    如果你有装norton防毒的话
    scripting block不要勾选
      

  7.   

    不行的,看来我的Misrosoft Scripting Runtime不全,我该从哪里重新安装呢
      

  8.   

    Dim fs As New Scripting.FileSystemObject
      

  9.   

    有时候可能是你的ActiveX组件的版本冲突,这种情况下先正确设置引用,然后在声明FileSystemObject变量的时候指明库的名称再试试看Dim fs As New Scripting.FileSystemObject