Need help with Visual Basic

hi there,
i need help with a few issues.

  1. i need to double up the value of an input when a certain checkbox is selected. i tried simply multiplying it with 2, but it didn’t work. then i gave the number 2 a name and declared it as a constant variable but it sill didn’t work. here’s what i have:

If chkCredit.Checked = True Then
FinalDeposit = FinalDeposit * 2
End If

If chkCredit.Checked = True Then
FinalDeposit = FinalDeposit * BadCredit
End If

  1. I need to display an error message for inputs less than 500. the program displays the error message and the modal box but as soon as i click OK, it goes ahead and does the calculations. i need it not to work for inputs less than 500.

     If txtBaseRent.Text < 500 Then
         MessageBox.Show("Base rent must be 500 or higher", "Input Error", MessageBoxButtons.OK, MessageBoxIcon.Stop)
     End If

lblRentDisplay.Text = “ERROR”
lblDepositDisplay.Text = “ERROR”

any help is truly appreciated!!!

Without knowing the language one cannot offer any help, and hope someone pipes in to help, who can. CC does not have any VB or .NET related courses, so there is not really a community to draw upon.

One question I would ask, though, concerns HTML attributes. It looks like VB capitalizes methods, keywords and booleans, but would that include form attributes?

if chkCredit.checked Then
1 Like