I need help figuring out how to store the values of the text boxes into the variables I have declared (in bold). I can't seem to get this to work, here is my code, I would appreciate any suggestions:
VB.NET:
Option Explicit On
Option Strict On
Imports System.Convert
Public Class frmMain
Inherits System.Windows.Forms.Form
[B]Private mlblInitialValue As Double
Private mlblSalvageValue As Double
Private mlblAssetLife As Single[/B]
Private mdblTotalDepreciation As Double
Private mdblAnnualDepreciation As Double
mlblInitialValue = (txtInitialValue.Text)
mlblSalvageLife = (txtSalvageLife.Text)
mlblAssetLife = (txtSalvageLife.Text)
mdblTotalDepreciation = mlblInitialValue - mlblSalvageLife
mdblAnnualDepreciation = mdblTotalDepreciation / mdblAssetLife
Last edited by a moderator: