Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Variant valiables problem

Problems with VBA variant type variables when I define DIM SUM_1 as
double after running the main program the end results have decimal
places that dont match. This is drive me nuts yet when I define it as
variant type the final results have all the decimal digits matching
up. IS there something particular about

"RESP = 5.55 * 0.3048 * 0.3048 * SUM_1 / (0.252 * 1.8)"

Because if I did say Sum_2 = SUM1 and then used SUM_2 above instead of
SUM_1 then I get right digits it seems that the SUM_1 in the above
expression is the only one that matters. The answer changes if SUM_2
is defines as variant or double.


Sub bootfile(I_1, OUTFIT_1, ISHI_1, ISPI_1, COVER_1, JCOOL2_1, CLO_1,
ISUBMP_1, AIRC_1, LIQC_1)
Dim SUM_1
....................... some code
SUM_1 = 0#
....................... some code
SUM_1 = SUM_1 + H(L_1, IPLUS) / XKI(IG)
....................... some code
RESP = 5.55 * 0.3048 * 0.3048 * SUM_1 / (0.252 * 1.8)
....................... some code
End sub
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
To get a sum for variant currency values [email protected] Excel Discussion (Misc queries) 3 November 24th 07 01:07 PM
String to Variant incorrect conversion Paul Excel Worksheet Functions 1 October 4th 07 01:11 AM
How do I assign range to variant and use Mike H[_2_] Excel Discussion (Misc queries) 7 June 7th 07 01:40 AM
Started out as an Access problem. Now an Excel problem RobertM Excel Discussion (Misc queries) 2 April 26th 06 07:30 PM
problem with a conditional max problem Brian Cornejo Excel Discussion (Misc queries) 1 February 18th 05 06:25 PM


All times are GMT +1. The time now is 06:56 AM.

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

About Us

"It's about Microsoft Excel"