CurveGamma
CurveGamma

Reputation: 4559

Opening New File using VBA on Mac

I am using Excel 2011 for Mac and trying to open a new file.

However, I keep getting an error that file not found even though the file is there. The code I am using is below:

Dim theFile As String

theFile = "/Users/Dev/Desktop/RCM/test.xls"
Workbooks.Open FileName:=theFile

Any suggestions?

Upvotes: 2

Views: 6673

Answers (2)

Make the open line:

Workbooks.Open Filename:="/Users/John/Downloads/File.xlsx"

Upvotes: 0

Tim Williams
Tim Williams

Reputation: 166126

Mac uses a different path separator: switch your "/" to ":"

Upvotes: 2

Related Questions