View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Determining Office Version

You received information on how to determine the version, but I would
suspect you would be better off using the code for xl97. If you have
arguments for a later version and try to compile the code in xl97, you will
still get an error. This is more problematic with xl2000 and xl2002 since
both are VBA6 and conditional compilation can't identify the difference.

--
Regards,
Tom Ogilvy

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