このコードでは、これらの宣言をListBoxに入れることができますが、残念ながら実行時には口座番号だけが表示され、それ以外は表示されません。私は何が間違っているのかを見出そうとしていますが、それを理解することはできません。ATM用の表示コードの作成
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