VB:GetFolder() 括号中使用变量

来源:百度知道 编辑:UC知道 时间:2024/07/07 04:10:39
VB 6.0中,GetFolder() 括号中可以使用变量来代替路径吗?不能的话有没有其它办法来实现两样的功能。我想写一个数据备份工具,需要获取文件夹的大小值
我是初学者,不要太讲得太深奥哦

mosquitokobe:folder1是哪来的

Private Sub Form_click()
Dim objFso
Dim a As String
Set objFso = CreateObject("Scripting.FileSystemObject")
a = "z:\12"
Set folder1 = objFso.GetFolder(a)
MsgBox folder1.Size & "Bytes"
End Sub

folder1只是个名字而已 随便你改什么都行。

GetFolder如果是通用函数的话可以用变量来替换

不过这个函数好像不是VB的库函数

-----------------------

可以,不过这个函数我怎么查不到?