开发者

Opening New File using VBA on Mac

开发者 https://www.devze.com 2023-04-10 18:15 出处:网络
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:

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

精彩评论

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

关注公众号