打开图像文件

时间:2015-08-05 19:36:09

标签: excel macos excel-vba-mac

我无法找出用于打开MAC OS文件的VBA语法

这是我的代码

Sub OpenFile()
    Open (Users/dongougkim/ShareSync/Dan's stuff/Current Services/logo.png)
End Sub

我也试过

Open ("Users/dongougkim/ShareSync/Dan's stuff/Current Services/logo.png")
Open ("Macintosh HD/Users/dongougkim/ShareSync/Dan's stuff/Current Services/logo.png")
Open ("Macintosh HD:Users:dongougkim:ShareSync:Dan's stuff:Current Services:logo.png")

请帮忙。让我疯狂

1 个答案:

答案 0 :(得分:0)

You need to prefix Users with a slash, otherwise the path is relative.

Try this:-

Sub OpenFile()
    Open (/Users/dongougkim/ShareSync/Dan's stuff/Current Services/logo.png)
End Sub