....trying to get the following result into a list box.
Dim cost As Double
Dim salvage As Double
Dim life As Double
Dim year As Double
Dim factor As Variant
Dim depreciation As Double
Dim totaldepr As Double
Dim remainingval As Double
Private Sub Command1_Click( )
salvage = 200
life = 10
cost = CDbl(Text1)
For year = 1 To 10
depreciation = DDB(cost, salvage, life, year)
totaldepr = (depreciation + totaldepr)
remainingval = (cost - totaldepr)
Print depreciation, "for year", year, "total
depriciation="; totaldepr,"valu e="; remainingval
Next year
End Sub
thanks for any guidance.
Dim cost As Double
Dim salvage As Double
Dim life As Double
Dim year As Double
Dim factor As Variant
Dim depreciation As Double
Dim totaldepr As Double
Dim remainingval As Double
Private Sub Command1_Click( )
salvage = 200
life = 10
cost = CDbl(Text1)
For year = 1 To 10
depreciation = DDB(cost, salvage, life, year)
totaldepr = (depreciation + totaldepr)
remainingval = (cost - totaldepr)
Print depreciation, "for year", year, "total
depriciation="; totaldepr,"valu e="; remainingval
Next year
End Sub
thanks for any guidance.
Comment