i need some help trying to create a program its very simple problem but here it goes:
i want to display the sum of two numbers in a list box. here is my code:
Public Class frmBob
Private Sub btnDisplay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplay.Click
'Dim fmt "{0,15} {0,-6}"
Dim customer, laborCst, partsCst, totalCst, n, m, dblVar, sum As String
dblVar = txtSecondNum.Text
dblVar = txtThirdNum.Text
n = txtSecondNum.Text * 35
m = txtThirdNum.Text * 0.05 + txtThirdNum.Text
sum = n + m
customer = "Customer:"
laborCst = "Labor Cost:"
partsCst = "Parts Cost:"
totalCst = "Total Cost:"
lstOne.Items.Clear()
lstOne.Items.Add(customer)
lstOne.Items.Add(laborCst & n)
lstOne.Items.Add(partsCst & m)
'lstOne.Text = CStr(sum)
lstOne.Items.Add(totalCst & sum)
'lstOne.Text = CDbl(totalCst & sum)
as you can see the problems i'm having are in bold, i dont know how to get the output right.