I wrote a sample code which worked
Private Sub DetectExcelVersion()
Dim i As Integer
For i = 20 To 1 Step -1
Try
If IsReference(CreateObject("Excel.Application" & "." & i)) Then
MsgBox("Excel version is " & i)
End If
Catch ex As Exception
MsgBox(ex.Message.ToString & " Excel.Application" & "." & i)
End Try
Next