July 9, 2021
Hello! I'm creating some simple macros to help my father-in-law with his small business. I wrote the macros (and they worked) on a PC, then found out that he uses a Mac, so I'm trying to convert them. I'm having trouble with one in particular that is supposed to create a Dropbox folder with the customer name (in cell D2) if it doesn't already exist, or give a message saying "Folder already exists" if it does. It works if the folder doesn't exist, but I get an error saying "Path/File access error" if it already exists.
Path = "/Users/hisusername/Dropbox/Customers/" & [D2]
Folder = Dir(Path, vbDirectory)
If Folder = bvNullString Then
MkDir "/Users/hisusername/Dropbox/Customers/" & [D2]
MsgBox "Folder already exists."
November 8, 2013
To create folders in Mac, it's not as easy as in windows.
You have to check the environment:
#If VBA7 then
To create a folder on mac, you have a good resource here: