View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Determining Office Version

Try this

Sub test()
If Val(Application.Version) = 8 Then
MsgBox "97"
Else
MsgBox "2000-2003"
End If
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



wrote in message ...
How do I determine the version of Excel one is using?

I am opening a text file and found out that the code is different
for Office 97 and Office XP. So I now need an IF statement

If (XLversion = 97) Then

End iF

If (XLversion = XP) Then

End If


Lance