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,或者是剛剛在編譯器不斷的疏忽?