Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Private Sub btnent_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnent.Click
  2.  
  3.  
  4.         'ensures a number that ends with 0 or 5 can only be entered into the text box'
  5.  
  6.  
  7.         If txtAmount.Text >= myaccount Then MessageBox.Show("You have insufficient funds to make that transaction")
  8.         If txtAmount.Text >= danaccount Then MessageBox.Show("You have insufficient funds to make that transaction")
  9.         If txtAmount.Text >= lewisaccount Then MessageBox.Show("You have insufficient funds to make that transaction")
  10.  
  11.  
  12.  
  13.         If txtAmount.Text >= 501 Then MessageBox.Show("enter amount equal or less than £500 please")
  14.         txtAmount.Clear()
  15.  
  16.  
  17.  
  18.         If txtAmount.Text.EndsWith(1) Then
  19.  
  20.             MsgBox("Number does not end in 0 or 5!")
  21.             txtAmount.Clear()
  22.         ElseIf txtAmount.Text.EndsWith(2) Then
  23.  
  24.             MsgBox("Number does not end in 0 or 5!")
  25.             txtAmount.Clear()
  26.         ElseIf txtAmount.Text.EndsWith(3) Then
  27.  
  28.             MsgBox("Number does not end in 0 or 5!")
  29.             txtAmount.Clear()
  30.         ElseIf txtAmount.Text.EndsWith(4) Then
  31.  
  32.             MsgBox("Number does not end in 0 or 5!")
  33.             txtAmount.Clear()
  34.         ElseIf txtAmount.Text.EndsWith(6) Then
  35.  
  36.             MsgBox("Number does not end in 0 or 5!")
  37.             txtAmount.Clear()
  38.         ElseIf txtAmount.Text.EndsWith(7) Then
  39.  
  40.             MsgBox("Number does not end in 0 or 5!")
  41.             txtAmount.Clear()
  42.  
  43.         ElseIf txtAmount.Text.EndsWith(8) Then
  44.  
  45.             MsgBox("Number does not end in 0 or 5!")
  46.             txtAmount.Clear()
  47.  
  48.         ElseIf txtAmount.Text.EndsWith(9) Then
  49.  
  50.             MsgBox("Number does not end in 0 or 5!")
  51.             txtAmount.Clear()
  52.  
  53.         End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement