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 sug开发者_如何转开发gestions?
Mac uses a different path separator: switch your "/" to ":"
Make the open line:
Workbooks.Open Filename:="/Users/John/Downloads/File.xlsx"
精彩评论