Why use
Function ExcelVersion() As String
Dim temp As String
On Error Resume Next
Select Case CLng(Application.Version)
Case 9: temp = "Excel 2000"
Case 10: temp = "Excel 2002"
Case 11: temp = "Excel 2003"
Case 12: temp = "Excel 2007"
Case 14: temp = "Excel 2010"
End Select
On Error GoTo 0
ExcelVersion = temp
End Function
instead of
Function ExcelVersion() As String
On Error Resume Next
Select Case CLng(Application.Version)
Case 9: ExcelVersion = "Excel 2000"
Case 10: ExcelVersion = "Excel 2002"
Case 11: ExcelVersion = "Excel 2003"
Case 12: ExcelVersion = "Excel 2007"
Case 14: ExcelVersion = "Excel 2010"
End Select
On Error GoTo 0
End Function
?
I've seen VBA programmers using the first topology more than the second... is there a reason?