[RESOLVED] Adding array items
This is a really dumb issue and im very confused.. But here it is..
I have a program thats adding the answers to questions. It takes each of the answers and throws them into an array, then goes through the array and adds them up with whatever multipliers they chose earlier. But, alot of the questions are dealing with money, so there's decimals.
When i add the values to the array, it rounds them off every time! I dont know how to make it stop. Here's the code that actually puts the value of each answer into the array:
VB Code:
For MyCount = 1 To Len(Formula)
Select Case MyCount
Case Is = 1, 3, 5, 7, 9, 11, 13, 15 'This is the numbers
Cost = Cost + 1
MultNum(MyCount) = Left(Formula, 1)
MultNum(MyCount) = frmNewProp.GridJobSpecCustom.TextMatrix(QRow, (MultNum(MyCount) * 2) - 1)
Formula = Right(Formula, Len(Formula) - 1)
Case Is = 2, 4, 6, 8, 10, 12, 14 'This is the multipliers
Multiplier(MyCount) = Left(Formula, 1)
Formula = Right(Formula, Len(Formula) - 1)
End Select
Next MyCount
Formula for example will have a value like this: "1*2*3"
That just means First question x Second question x 3rd question.
Basically what that code is doing is going through the forumla, and seperating out each of the multipliers, and answers. It first makes MultNum the value of the answer on the grid(ie question 1, 2 or 3 etc..). Then right after it makes it the actual value of the answer on the grid, but this is where it either truncates the value after the decimal, or rounds it up depending on my declarations. I tried making MultNum integer, long, and currency... And it does these things each time.. Anybody know how to stop this?