Response to: little help needed in this problem vb 2010
Revision 3
Hi,
Try this:
Private Sub KryptonButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles KryptonButton1.Click
Dim i As Integer = 0
Dim l As Integer = 0
Dim lcn As String = ""
If textBox4.Text = "" AndAlso textBox5.Text = "" AndAlso textBox6.Text = "" Then
MessageBox.Show("Please Enter Date of Birth!!!")
Return
End If
Dim dateOfBirthWithoutSpaces As String = (TextBox4.Text + TextBox5.Text + TextBox6.Text).Replace(" ", "")
For Each c As Char In dateOfBirthWithoutSpaces
i += (Convert.ToInt32(c.ToString()))
Next
lcn = i.ToString()
For Each c As Char In lcn
l += (Convert.ToInt32(c.ToString()))
Next
TextBox7.Text = l.ToString()
End Sub
Hope this helps.
Posted 28-Dec-12 5:44am
by
Thomas Daniels.