Hi
I'm a struggling online class student. Trying get my calcuation using SLN
Example is for
Initial value= 1000
Asset Life = 10
sALVAGE VALUE =100
I need to have the user do a print preview. It is printing but not the correct answers at all
I get nothing but 0 . I will not lie, I am lost. Here is the code I've attempted to write. If you can stir me in the right direction, I would be so thankful.
Here goes what i have (AND I KNOW IT'S NOT RIGHT) BUT i tried)
Private mdblInitialValue As Double
Private mdblAssetLife As Double
Private mintSalvageValue As Integer
Private mdblDepreciation as Double
Private mdblEndValue as Double
Private msngCurrentPage As Single
Private msngPages As Single
Private msngYPos As Single
Private msngFontHeight As Single
Private mfntPrint As Font
' Exit the solution.
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
Me.Close()
End Sub
Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click mdblAssetLife = convert.ToDouble(txtAssetLife.Text) / 12 / 100
mdblInitialValue = convert.ToDouble(txtInitialValue.Text)
mintSalvageValue = convert.ToInt32(txtSalvageValue.Text) * 12
mdblDepreciation = mdblAssetLife - mintSalvageValue / mdblAssetLife
Dim iIndex As Integer
For iIndex = 1 To mdblAssetLife
mintSalvageValue = mdblEndValue
mdblEndValue = mdblEndValue - mdblDepreciation
Next iIndex
I'm a struggling online class student. Trying get my calcuation using SLN
Example is for
Initial value= 1000
Asset Life = 10
sALVAGE VALUE =100
I need to have the user do a print preview. It is printing but not the correct answers at all
I get nothing but 0 . I will not lie, I am lost. Here is the code I've attempted to write. If you can stir me in the right direction, I would be so thankful.
Here goes what i have (AND I KNOW IT'S NOT RIGHT) BUT i tried)
Private mdblInitialValue As Double
Private mdblAssetLife As Double
Private mintSalvageValue As Integer
Private mdblDepreciation as Double
Private mdblEndValue as Double
Private msngCurrentPage As Single
Private msngPages As Single
Private msngYPos As Single
Private msngFontHeight As Single
Private mfntPrint As Font
' Exit the solution.
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
Me.Close()
End Sub
Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click mdblAssetLife = convert.ToDouble(txtAssetLife.Text) / 12 / 100
mdblInitialValue = convert.ToDouble(txtInitialValue.Text)
mintSalvageValue = convert.ToInt32(txtSalvageValue.Text) * 12
mdblDepreciation = mdblAssetLife - mintSalvageValue / mdblAssetLife
Dim iIndex As Integer
For iIndex = 1 To mdblAssetLife
mintSalvageValue = mdblEndValue
mdblEndValue = mdblEndValue - mdblDepreciation
Next iIndex