I have an excel spreadsheet that needs to get the current directory of the file. For a worksheet function I use =LEFT(CELL("filename"),FIND("[",CELL("filename"))-1), in VBA I use ActiveWorkbook.Path. The file is on my hard drive in my OneDrive folder so it is synced to the cloud. Sometimes I have no issues (most of the time), but at times the file directory will be the cloud path (htpps://....) and this will not work.
Does anyone know how to always get the local path?