Many of us use or support more than one version of Office. With more than one version running, knowing the version of the currently running application can be critical. Not everything works the same way from version to version.

Fortunately, VBA makes the task of discerning the version of the currently running software a simple task. The following subprocedure returns the version number in a message box:

Sub GetVersion()
  MsgBox "The current version is " & Application.Version, _
    vbOKOnly, "Version"
End Sub

You can just as easily return the version number by using a function in the form

Function GetVersion() As Long
  GetVersion = Application.Version
End Function

(If you add both procedures to the same module, rename one of them.)