0
我无法为Macintosh运行Excel,但由于Excel VBA编译器常量VBA7是在Excel(针对Windows)2010中引入的,因此我认为它也适用于Mac Excel 2011。Excel VBA编译器常量:Mac Excel 2011 <> VBA7?
但是,显然这个代码时,在Mac的Excel 2011运行了“其他”部分(适用于Excel 2007中)编译:
#If VBA7 Then
'Set constants here for Excel 2010 or later:
#Else
'Set constants here for Excel 2007 or earlier:
#End If
因此,要得到它的谁是Mac的Excel 2011用户工作,我不得不把它改成这样:
#If VBA7 Or Mac Then
'Set constants here for Excel for Windows 2010 or later, or Excel for Mac:
#Else
'Set constants here for Excel for Windows 2007 or earlier:
#End If
确实的Mac的Excel 2011真的没有VBA7,或者是刚刚在编译器不断的疏忽?