#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Version Problem

Hi All
i have come across a little problem ..
i am using excel object to create excel file from some data ..
problem is that im using office 2003 object and ma client is using office
2000.
my method
excelworksbook.open()
takes 15 parameter but in 2000 it takes just 13 parametes so it causes
problem....
2nd
in excel 2000 the function is cell.value2()
while in 2003 it is cell.value()
client can not use office 2003 and i have no time to completly wewrite the
code


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 389
Default Version Problem

If you don't need the extra parameters, omit them and the code should work
in both versions. But if you need them for 2003, you can modify the
Workbooks.Open to perform late binding if the version is 2003 or later. For
example I know that Excel 2003 complains if there is an invalid worksheet
name, say a data dump created by a non-Excel app which has invalid
characters in it, and the CorruptLoad parameter can be used to allow the
macro to continue.

If Val(Application.Version) = 11 Then
' XL 2003+, so use late bound approach
Dim objWkb As Object
Dim objWkbs As Object
Set objWkbs = Workbooks
' Using the CorruptLoad parameter
Set objWkb = objWkbs.Open("<filename.xls", False, True, , , , , , ,
, , , , , 1)
Else
' Use the XL 2000 or prior workbook approach
Set objWkb = Workbooks.Open("<filename.xls", False, True)
End If

Also, the Value property exists both 2000 and 2003.

--
Tim Zych
SF, CA


"Mian_Ghous" wrote in message
...
Hi All
i have come across a little problem ..
i am using excel object to create excel file from some data ..
problem is that im using office 2003 object and ma client is using office
2000.
my method
excelworksbook.open()
takes 15 parameter but in 2000 it takes just 13 parametes so it causes
problem....
2nd
in excel 2000 the function is cell.value2()
while in 2003 it is cell.value()
client can not use office 2003 and i have no time to completly wewrite the
code




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Version Problem

well friend im not clear yet,,
my application work good for 2003 but i want it for 2000
no need for 2003
in 2003 value function has name value2 while in 2000 it has value name
so how to solve this problem..
actually client system gives error on 2003 because it dont have object for
11 or 12
it has object number 8
:(

"Tim Zych" wrote:

If you don't need the extra parameters, omit them and the code should work
in both versions. But if you need them for 2003, you can modify the
Workbooks.Open to perform late binding if the version is 2003 or later. For
example I know that Excel 2003 complains if there is an invalid worksheet
name, say a data dump created by a non-Excel app which has invalid
characters in it, and the CorruptLoad parameter can be used to allow the
macro to continue.

If Val(Application.Version) = 11 Then
' XL 2003+, so use late bound approach
Dim objWkb As Object
Dim objWkbs As Object
Set objWkbs = Workbooks
' Using the CorruptLoad parameter
Set objWkb = objWkbs.Open("<filename.xls", False, True, , , , , , ,
, , , , , 1)
Else
' Use the XL 2000 or prior workbook approach
Set objWkb = Workbooks.Open("<filename.xls", False, True)
End If

Also, the Value property exists both 2000 and 2003.

--
Tim Zych
SF, CA


"Mian_Ghous" wrote in message
...
Hi All
i have come across a little problem ..
i am using excel object to create excel file from some data ..
problem is that im using office 2003 object and ma client is using office
2000.
my method
excelworksbook.open()
takes 15 parameter but in 2000 it takes just 13 parametes so it causes
problem....
2nd
in excel 2000 the function is cell.value2()
while in 2003 it is cell.value()
client can not use office 2003 and i have no time to completly wewrite the
code





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Version Problem Mian_Ghous Excel Worksheet Functions 0 November 19th 07 05:24 AM
Help Required!!! Macro to load data from version 1 to version 2 [email protected] Excel Worksheet Functions 0 August 23rd 06 07:27 AM
Excell version problem??? Mabe-GE Excel Worksheet Functions 4 January 24th 06 11:19 PM
Recover earlier version of excel sheet after new version saved? stephanie38 Excel Discussion (Misc queries) 3 June 17th 05 03:52 AM
version problem Lisa Excel Discussion (Misc queries) 4 April 1st 05 06:57 PM


All times are GMT +1. The time now is 02:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"