0

I can't create a folder in mac vba with the following code:

    ' Create new folder for customer if not existing
With CreateObject("Scripting.FileSystemObject")
    If Not .FolderExists(\Library\Pengeministeriet) Then
        .CreateFolder Path
    End If
End With

The error is that "Active X component can't create object".

What's the solution for this?

Forecaster
  • 21
  • 3
  • IIRC, you need to pass a string to `FolderExits`... you are not passing a string; enclose `\Library\Pengeministeriet` in double-quotes – SmileyFtW Mar 08 '20 at 14:28
  • 1
    On a [MAC](https://stackoverflow.com/questions/19869266/vba-excel-dictionary-on-mac) you do not have the scripting library available. – Storax Mar 08 '20 at 14:31

0 Answers0