Open Excel Workbook using VBA in Excel 2016 for Macintosh

  • I'm using office 2016 for Macintosh. Trying to open a workbook from 2014 using VBA. Here is the line of code:

    Workbooks.Open ("C:\Users\dcfeatheradm\Documents\Budget Spreadsheets\2014\Budget_2014.xlsm")

    I have also tried this:

    Workbooks.Open ("Yosemity/Users/dcfeatheradm/Documents/Budget Spreadsheets/2014/Budget_2014.xlsm")

    I keep getting a message indicating that VBA can't find it. This is the right path and filename, however I'm not sure about the usage of the "C:" or the space " " in the directory "Budget Spreadsheets" on the Macintosh.

    I appreciate any help anybody can offer.

    Thank you


  • Alright never mind I figured it out! Unix is at the core of apples new systems. They use forward slashes instead of backslashes in the path strings. So the second line of VB code in my first post was close to correct. All I had to do is remove the volume name (Yosemity) and begin the path string with a forward slash. Not to mention the fact that I misspelled Yosemite. This works:

    Workbooks.Open ("/Users/dcfeatheradm/Documents/Budget Spreadsheets/2014/Budget_2014.xlsm")

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!