开发者

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"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜