Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/vba/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
尝试在vba mac中创建文件夹时出错_Vba_Macos - Fatal编程技术网

尝试在vba mac中创建文件夹时出错

尝试在vba mac中创建文件夹时出错,vba,macos,Vba,Macos,我无法使用以下代码在mac vba中创建文件夹: ' Create new folder for customer if not existing With CreateObject("Scripting.FileSystemObject") If Not .FolderExists(\Library\Pengeministeriet) Then .CreateFolder Path End If End With 错误是“活动X组件无法创建对象” 这个

我无法使用以下代码在mac vba中创建文件夹:

    ' Create new folder for customer if not existing
With CreateObject("Scripting.FileSystemObject")
    If Not .FolderExists(\Library\Pengeministeriet) Then
        .CreateFolder Path
    End If
End With
错误是“活动X组件无法创建对象”


这个问题的解决方案是什么?

IIRC,您需要将一个字符串传递给
FolderExits
。。。您没有传递字符串;如果没有可用的脚本库,请将
\Library\Pengeministeriet
用双引号括起来。