Public Class Form1 'Class level constants Const dblHOURS_DAY As Double = 24 'Hours a day Dim intPowerNeeded As Integer Private Sub txtCostPerHour_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCostPerHour.TextChanged 'Declare cost per hour Dim decCostPerHour As Decimal decCostPerHour = CDec(txtCostPerHour.Text) If decCostPerHour <= 0 Then 'Display out of range message MessageBox.Show("Please enter a positive number greater than zero.") End If 'Displays the inputted data without the use label lblDisplayKiloWattHourCost.Text = txtCostPerHour.Text End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim decCostPerHour As Decimal Dim lblDisplayKiloWattHourCost As Decimal decCostPerHour = CDec(txtCostPerHour.Text) lblDisplayKiloWattHourCost = CDec(decCostPerHour.ToString("n")) End Sub Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged Dim strOut As String strOut = ListBox1.SelectedItem.ToString 'Create the above variable name in the label area where I need this data to be copied to. End Sub Private Sub txtNumberOfHours_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtNumberOfHours.TextChanged lblNumberOfHoursDisplay.Text = txtNumberOfHours.Text Dim intNumberOfHoursDisplay As Integer Dim intCostDisplay As Integer intNumberOfHoursDisplay = CInt(txtNumberOfHours.Text) intCostDisplay = intNumberOfHoursDisplay * intPowerNeeded End Sub Private Sub strSelectedItemFromListBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles strOut.SelectedIndexChanged strOut.Text = lblCostDisplay.Text End Sub Private Sub txtPowerNeeded_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtPowerNeeded.TextChanged intPowerNeeded = CInt(txtPowerNeeded.Text) lblCostDisplay.Text = CStr(intPowerNeeded) End Sub End Class