返回
首页 > 数码科技

Office 开发版本号与版本对应关系 详解

时间: 2023-01-23

判断 Office 版本UHcoffice教程网

office97 : 8.0UHcoffice教程网

office2000 : 9.0UHcoffice教程网

officeXP(2002) : 10.0UHcoffice教程网

office2003 : 11.0UHcoffice教程网

office2007: 12.0UHcoffice教程网

office2010 : 14.0UHcoffice教程网

office2013: 15.0UHcoffice教程网

Office 开发版本号与版本对应关系

 UHcoffice教程网

 UHcoffice教程网

 UHcoffice教程网

MsgBoxThisWorkbook.CalculationVersion 获取一个数字,该数字指示上次对工作簿进行完全重新计算的 Excel的版本。UHcoffice教程网

最右边四位是计算引擎的次版本号,其它位(左边)是Microsoft Office Excel的主版本。UHcoffice教程网

例子 114210UHcoffice教程网

11 是 Excel 11, i.e. Excel2003UHcoffice教程网

92512UHcoffice教程网

9 是 Excel 9UHcoffice教程网

0 没有进行过计算是 0!!!UHcoffice教程网

Excel 97: 8UHcoffice教程网

Excel XP:10UHcoffice教程网

FileFormat例子:UHcoffice教程网

SubxlFileVersion()UHcoffice教程网

Dim Typ AsStringUHcoffice教程网

Select CaseActiveWorkbook.FileFormatUHcoffice教程网

Case-4143: Typ = "Excel 2000 et plus"UHcoffice教程网

Case 16:Typ = "Excel 2.1"UHcoffice教程网

Case 29:Typ = "Excel 3"UHcoffice教程网

Case 33:Typ = "Sheet Excel 4"UHcoffice教程网

Case 35:Typ = "Workbook Excel 4"UHcoffice教程网

Case 39:Typ = "Excel 5"UHcoffice教程网

Case 43:Typ = "Excel 97/2000& 5/95"UHcoffice教程网

CaseElse: Typ = "Unknown"UHcoffice教程网

End SelectUHcoffice教程网

MsgBox "File format: "& Typ & " !",64UHcoffice教程网

End SubUHcoffice教程网

方法二:UHcoffice教程网

SubExcel_Ver()UHcoffice教程网

Dim X, Y As StringUHcoffice教程网

X = Application.VersionUHcoffice教程网

select case XUHcoffice教程网

case 8#UHcoffice教程网

Y = "97"UHcoffice教程网

case 9#UHcoffice教程网

Y = "2000"UHcoffice教程网

case 11#UHcoffice教程网

Y = "2003"UHcoffice教程网

end selectUHcoffice教程网

MsgBox XUHcoffice教程网

MsgBox Y, , "Excel版本"UHcoffice教程网

EndSubUHcoffice教程网

Public Sub技巧1_001()UHcoffice教程网

Dim myVersion As StringUHcoffice教程网

Select Case Application.VersionUHcoffice教程网

Case "8.0"UHcoffice教程网

myVersion = "97"UHcoffice教程网

Case "9.0"UHcoffice教程网

myVersion = "2000"UHcoffice教程网

Case "10.0"UHcoffice教程网

myVersion = "2002"UHcoffice教程网

Case "11.0"UHcoffice教程网

myVersion = "2003"UHcoffice教程网

Case ElseUHcoffice教程网

myVersion = "版本未知"UHcoffice教程网

End SelectUHcoffice教程网

MsgBox "Excel 版本是: " &myVersionUHcoffice教程网

End SubUHcoffice教程网

本程序仅适用于Excel 2003(11.0),如果当前版本不是2003则退出UHcoffice教程网

If Application.Version<> "11.0" Then MsgBox "本代码仅在 Excel2003 下可使用! ", vbOKOnly + vbCritical, "Keanjeason": ExitSubUHcoffice教程网

SubxlFileVersion()'获取版本号UHcoffice教程网

Dim Typ AsStringUHcoffice教程网

Select CaseActiveWorkbook.FileFormatUHcoffice教程网

Case -4143: Typ = "Excel 2000 et plus"UHcoffice教程网

Case 16: Typ = "Excel 2.1"UHcoffice教程网

Case 29: Typ = "Excel 3"UHcoffice教程网

Case 33: Typ = "Sheet Excel 4"UHcoffice教程网

Case 35: Typ = "Workbook Excel 4"UHcoffice教程网

Case 39: Typ = "Excel 5"UHcoffice教程网

Case 43: Typ = "Excel 97/2000&5/95"UHcoffice教程网

Case Else: Typ = "Unknown"UHcoffice教程网

End SelectUHcoffice教程网

MsgBox "File format: "& Typ & " !",64UHcoffice教程网

End SubUHcoffice教程网

猜你喜欢

版权所有 Copyright©2023 餐饮美食网 版权所有

粤ICP备15109582号

联系邮箱:187348839@qq.com