How can I determine if my VB code is running on Office 2016 for Mac?

て烟熏妆下的殇ゞ 提交于 2019-12-05 20:02:53

In Office 2016 for Mac, there is a new conditional called MAC_OFFICE_VERSION to test which VB version the user is running. The following example shows how it to use it in your code:

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

Note: The "#If Mac" conditional remains unchanged from Office for Mac 2011.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!