这段代码编写使得这些声明进入列表框,但不幸的是,当它运行时,它只显示帐号而不显示其他内容。我试图找出我做错了什么,但无法弄清楚。创建一个自动柜员机的显示代码
Dim Loan As Decimal
Dim Account_Number, CustomerName, OpeningBalance, CurrentBalance, Loan_Taken, Amount_of_Loan, Amount_Deposited As String
If OneAccount.LoanTaken Then
Loan = OneAccount.CustomerLoan
Account_Number = TextBox1.Text
CustomerName = TextBox2.Text
OpeningBalance = Val(TextBox3.Text)
CurrentBalance = Val(TextBox3.Text) - Val(TextBox5.Text)
Label8.Text = CurrentBalance
If CheckBox1.Checked = True Then
Loan_Taken = "Yes"
Else
Loan_Taken = "No"
End If
Amount_of_Loan = Format(Loan, "Currency")
Amount_Deposited = Label8.Text
Amount_Deposited = Amount_Deposited
Amount_Deposited = Format(Amount_Deposited, "Currency")
ListBox2.Items.Add(String.Format(Account_Number, CustomerName, OpeningBalance, CurrentBalance, Loan_Taken, Amount_of_Loan, Amount_Deposited))
End If
https://ericlippert.com/2014/03/05/how-to-debug-small-programs/ – Jens