Для определения текущей версии Excel используйте такой код:
Sub Version()
Dim Ver as String
Select Case Val(Application.Version)
Case Is <= 8: 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 Else: Ver = "Версия не определена"
End Select
MsgBox "Вы работаете в " & Ver
End Sub
|