vba中创建如下两个函数,在returnvalue中调用create,返回总是false,请问问题出在那里,是不是create返回值的问题?Function returevalue()
Dim bt As Boolean
bt = create("mts", 1)
If bt Then
MsgBox "true", vbOKOnly
Else
MsgBox "false", vbOKOnly
End If
End Function
Function create(str As String, nCount As Integer) As Boolean
'Set fs = CreateObject("Scripting.FileSystemObject")
'fs.CopyFolder str, "c:\a"
'MsgBox str, vbOKOnly
If str <> "" Then
create = True
Else
create = False
End If
End Function
Dim bt As Boolean
bt = create("mts", 1)
If bt Then
MsgBox "true", vbOKOnly
Else
MsgBox "false", vbOKOnly
End If
End Function
Function create(str As String, nCount As Integer) As Boolean
'Set fs = CreateObject("Scripting.FileSystemObject")
'fs.CopyFolder str, "c:\a"
'MsgBox str, vbOKOnly
If str <> "" Then
create = True
Else
create = False
End If
End Function
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货