Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have some excel5 files to work on,
but some function only works in newer version. so how do covert excel version, say use "saveas"? any clue?thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Say you want to sort a range but the Range.Sort method either doesn't exist or has different parameter lists depending of the XL version. You could then use a general Object data type instead of a Range. This will make the code compile properly. Dim obj as Object Dim version as string version=application.Version set obj = Activesheet.Range("A1:F100") ''' range to sort if Version= "9" then obj.Sort ..... xl2k: with a specific list of parameters elseif version="10" or version ="11" obj.Sort .... xl 2002 & xl 2003: with another list of parameters elseif version ="12" obj.Sort ..... xl 2007... same idea else ''' prior to xl2k ''' let's say Range.Sort doesn't exist prior to 2k then write your own code here ''' or pop a message to the user saying it cannot be done in this version ''' <code end if -- Regards, Sébastien <http://www.ondemandanalysis.com "copycat" wrote: I have some excel5 files to work on, but some function only works in newer version. so how do covert excel version, say use "saveas"? any clue?thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Covert 9 digits to 10 in excel | Excel Discussion (Misc queries) | |||
Macro - Save an Open Excel Version 4 as current version of Excel | Excel Programming | |||
how do I save the files automatically when I work in 2000 version | Excel Discussion (Misc queries) | |||
Recover earlier version of excel sheet after new version saved? | Excel Discussion (Misc queries) | |||
How does excel automatically covert cells when a different number. | Excel Discussion (Misc queries) |