我的宏是在Office 2016 for Mac上运行还是在Office for Mac 2011上运行,有没有条件可以用来区分
发布于 2015-06-23 05:26:59
在Office 2016 for Mac中,有一个名为MAC_OFFICE_VERSION的新条件来测试用户正在运行的VB版本。下面的示例展示了如何在代码中使用它:
Sub VersionConditionals()
#If MAC_OFFICE_VERSION >= 15 Then
Debug.Print "We are running on Mac 15+"
#Else
Debug.Print "We are not running on Mac 15+"
#End If
#If Mac Then
Debug.Print "We are running on a Mac"
#Else
Debug.Print "We are not running on a Mac"
#End If
End Sub注意: Office for Mac 2011中的"#If Mac“条件保持不变。
https://stackoverflow.com/questions/30990025
复制相似问题