Value changes type when assigned to Class

Viewed 22

I'm assigning 3 variables to a class. The variables are both Double, but for some reason invValue gets converted to Integer when I assign it to rv.invValue.

 Function invRecord(invDate As Date, invQuantity As Double, invValue As Double) As invRecordClass
    
    Dim rv As New invRecordClass
    rv.invDate = invDate
    rv.invQuantity = invQuantity
    rv.invValue = invValue
    Set invRecord = rv
End Function

Here an image of the Watched variables

Here an image of the Watched variables

As you can see invValue enters the Class correctly as a Double, but it then gets rounded into an Integer when assigned to rv.invValue. How can I make sure that the variable remains a Double? (it could be a Single or Decimal, as long as it keeps the decimals)

Please help me!

Thanks

1 Answers

invValue was defined as Integer within the class

Related