关于定义对象变量
okcat 2004-08-21 03:29:33 Dim fs
Set fs = CreateObject("Scripting.FileSystemObject")
If fs.FolderExists("c:\报表") = False Then
MkDir "c:\报表"
End If
Set fs = Nothing
这是正确答案,
为什么写成下面不行~
Dim fs as Scripting.FileSystemObject
If fs.FolderExists("c:\报表") = False Then
MkDir "c:\报表"
End If
Set fs = Nothing
是不是因为我写的这个 FS相当于只定义了一个对象变量,没有实际的值