2025年5月3日 星期六

VBA:判斷EXCEL 版本 (Application.Version)

小編很多台電腦,有時候會存在EXCEL版本不同,不同函數運算要特別掌握的情況,但透過掌握EXCEL版本會省掉很多BUG。MSDN

EX:

OFFICE 2010 :

DEBUG.PRINT Application.Version

顯示:14.0

以此類推,可以透過這個數字來掌握版本。

以下是不同 Excel 版本對應的 Application.Version 回傳值列表:

Excel 5: "5.0"

Excel 95: "7.0"

Excel 97: "8.0"

Excel 2000: "9.0"

Excel 2002 (XP): "10.0"

Excel 2003: "11.0"

Excel 2007: "12.0"

Excel 2010: "14.0" 

Excel 2013: "15.0"

Excel 2016: "16.0"

Excel 2019: "16.0"

Excel 365 (Microsoft 365): "16.0"


沒有留言:

張貼留言

集保庫存:辛苦了