Issue 10780 - Basic Currency type not implemented / not fully supported
Basic Currency type not implemented / not fully supported
 Status: CONFIRMED None Calc Application code (show other issues) OOo 1.0.1 PC All P3 Trivial (vote) --- AOO issues mailing list

 Reported: 2003-01-19 22:26 UTC by mortoray 2013-02-07 22:32 UTC (History) 1 user (show) issues ENHANCEMENT --- ---

Attachments

 Note You need to log in before you can comment on or make changes to this issue.
 mortoray 2003-01-19 22:26:14 UTC ```In a Basic Macro the type "Currency" is not supported in basic operations, such as addition, multiplication, etc. Additionally in standard spreadsheet functions the Currency type is not recognized correctly. A straight forward example shows one case I can definitely reproduce (run this an the "Object variable not set error" appears on "a = a * ..." : Sub Main Dim a as double a = 15 a = a * SampleCurrency() End Sub Function SampleCurrency( ) As Currency SampleCurrency = 47.50 End Function However, it appears that Currency doesn't involve itself with standard conversions and I had a lot of difficult getting it to work (eventually I gave up and switch my macros to Double and everything worked fine). That is, in some situations multiplying a value by a Currency will equal 0, other times it will fail, other times it will work. Here is one more case I found with the SUM function which indicates a problem. Using these two macro functions: Function CurrencyArray( ) As Variant Dim result( 2, 0 ) As Currency result( 0, 0 ) = 5.0 result( 1, 0 ) = 7.5 result( 2, 0 ) = 20 CurrencyArray = result() End Function Function DoubleArray( ) As Variant Dim result( 2, 0 ) As Double result( 0, 0 ) = 5.0 result( 1, 0 ) = 7.5 result( 2, 0 ) = 20 DoubleArray = result() End Function And then the following two formulas in the spreadsheet and their resulting displayed amount: =SUM( CurrencyArray() ) // = 0 (Incorrect) =SUM( DoubleArray() ) // = 32.5 (Correct) In the end I decided to use Double instead, but it has precision problems not being decimal (for our company and our profits this doesn't appear to cause a big impact at the moment though :) BTW, I almost went insane trying to figure out how to pass ranges of data back and forth between Macros and the Spreadsheet, the syntax is extremely picky and has about 100 pitfalls (all of which I fell in at some point). So if perhaps I did something obviously wrong I'm not surprised...``` frank 2003-01-20 11:20:54 UTC ```Hi Bettina, 1 4 u I think. Frank``` ace_dent 2008-05-16 02:38:36 UTC ```OpenOffice.org Issue Tracker - Feedback Request. The Issue you raised has the status 'New' pending further action, but has not been updated within the last 4 years. Please consider re-testing with one of the latest versions of OOo, as the problem(s) may have already been addressed. Either use the recent stable version: http://download.openoffice.org/index.html or consider trying the new OOo 3 BETA (still in testing): http://download.openoffice.org/3.0beta/ Please report back the outcome so this Issue may be Closed or Progressed as necessary - otherwise it may be Resolved as Invalid in the future. You may also wish to search for (and note) any duplicates of this Issue that may have advanced further by checking the Issue Tracker: http://www.openoffice.org/issues/query.cgi Many thanks, Andrew Cleaning-up and Closing old Issues as part of: ~ The Grand Bug Squash, pre v3 ~ http://marketing.openoffice.org/3.0/announcementbeta.html ``` bettina.haberer 2010-05-21 14:45:15 UTC ```To grep the issues easier via "requirements" I put the issues currently lying on my owner to the owner "requirements". ```