I have a macro-enabled workbook with one custom VBA function. The file is located in a OneDrive folder that is shared between myself and my husband. The file is sync'd to my hard drive using the OneDrive sync client. The file does not have the mark of the web. In properties, there's no checkbox to unblock the file. VBA macros are enabled in Excel. I've added the local folder where the file is sync'd to the list of trusted locations in Excel. Even added https://onedrive.live.com/ to the Trusted Sites zone in internet options.
Despite doing all of those things, I still get the Macros blocked warning, and the formulas that use the custom function do not work.
If I copy the same file to a different folder on my hard drive that is not under OneDrive control, the macros are enabled just fine. But if I then copy that same file back to the OneDrive folder and re-open it, the macros are again disabled.
Also, my husband, who created the VBA function, and is opening the same file in the same OneDrive location, but from his laptop, is able to use the macros without any issue.
Opening the file from OneDrive online folder in the browser and then choosing menu to open in desktop app has the same result.
It seems the OneDrive sync'd folder is the distinguishing factor in this case.