Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default varinat variables 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
DECLARE VARIABLES PROBLEM ytayta555 Excel Programming 7 March 19th 08 03:53 PM
Problem with references/variables Mats Samson Excel Programming 6 October 8th 05 05:42 PM
Webqueries and variables problem dazman Excel Programming 3 August 4th 05 08:41 PM
Webqueries and variables problem dazman Excel Discussion (Misc queries) 0 August 4th 05 10:31 AM
another look-up problem(three variables) mikey6704 Excel Programming 2 August 6th 04 09:06 PM


All times are GMT +1. The time now is 02:07 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"