SOLVED

MacOS issue VBA with Workbooks.Open

Copper Contributor

At work, we use Google Drive for Desktop and up until recently could use a script that included the line to find a file path in the computer was a Mac.

ElseIf Dir("/Volumes/GoogleDrive/Shared drives/etc.) <> "" Then

 

Last week Google Drive for Desktop had to move to Locations to stay compliant with MacOS. The line above no longer works with this change and I cannot figure out what the new file path could be. So for MacOS what would the file path be to open a workbook with Workbooks.Open if the workbook is in "Locations" outside of Macintosh HD?

1 Reply
best response confirmed by tzsabre (Copper Contributor)
Solution
After opening a workbook from that location you could open the VBE and open theimmediate window and then write:
?ActiveWorkbook.Path
and hit Enter. That should give you the location.
1 best response

Accepted Solutions
best response confirmed by tzsabre (Copper Contributor)
Solution
After opening a workbook from that location you could open the VBE and open theimmediate window and then write:
?ActiveWorkbook.Path
and hit Enter. That should give you the location.

View solution in original post