Thread: VBA version
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 VBA version

Excel 2000-2003 are using VBA6

You can use this also to test

Sub Test()
#If VBA6 Then
'code
#Else
'code
#End If
End Sub





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



"Matt" wrote in message om...
I am developing a solution to operate on multiple versions of Office
and in multiple languages. The code I have written needs to read and
write information to named ranges in Excel using comma separated
information. I have a language version that uses semi-colon in place
of comma to separate information. Using the
Application.International(xlListSeparator) property I can get the
correct separator to use. This works fine in VBA 5 but for VBA 6 the
language of the code is always used, so I always need to pass comma.

My question is how can I get the VBA version so I can apply the
correct list separator?

I know I can use the Application.Version property to get the Office
version, but I know of some versions of Office 97 running VBA6.