Для определения текущей версии Excel используйте такой код:
Sub Excel_Version()
Dim Ver As String
Select Case Val(Application.Version)
Case Is <9: Ver = "Microsoft Excel 20-го века"
Case 9: Ver = "Microsoft Excel 2000"
Case 10: Ver = "Microsoft Excel 2002"
Case 11: Ver = "Microsoft Excel 2003"
Case 12: Ver = "Microsoft Excel 2007"
Case 14: Ver = "Microsoft Excel 2010"
Case 15: Ver = "Microsoft Excel 2013"
Case 16: Ver = "Microsoft Excel 2016"
Case 17: Ver = "Microsoft Excel 2019"
Case 18: Ver = "Microsoft Excel 2021"
Case Else: Ver = "Версия не определена"
End Select
MsgBox "Вы работаете в " & Ver
End Sub |