View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Papa Jonah Papa Jonah is offline
external usenet poster
 
Posts: 148
Default vba calcs are acting funny

I have a process with 42 pages of code. There are a boatload of calcs in it
that seem to be working.
However there is one that is giving me a hard time and I can't figure it out.
I have declarations: public overallscore as integer, public allscore as
integer, and public totalscore as integer, and public dataset as integer
I do not have any declarations for x.

OverAllScore = totalscore / dataset 'OverAllScore =0
x = totalscore / dataset ' x=-0.5
allscore = x 'allscore =0
If OverAllScore = 0.5 Then . . .

I am getting a value of -2 for totalscore and 4 for dataset. However
overallscore =0.
On the contrary x=-0.5 which is as expected. Then allscore ends up =0
instead of equal to x.

What am I possibly overlooking?

TIA