Skip to content

Instantly share code, notes, and snippets.

@ImDevinC
Created March 1, 2014 15:11
Show Gist options
  • Save ImDevinC/9291225 to your computer and use it in GitHub Desktop.
Save ImDevinC/9291225 to your computer and use it in GitHub Desktop.
Fixed
Dim PassengerData As String
If strSSN.Length = 11 Then
PassengerData = strSSN + " "
Else
MessageBox.Show("Please enter a valid SSN")
Return
End If
If strFirstName.Length <= 30 Then
PassengerData += strFirstName + " "
Else
MessageBox.Show("First name may only contain up to 30 characters")
Return
End If
If strLastName.Length <= 30
PassengerData += strLastName + " "
Else
MessageBox.Show("Last name many only contain up to 30 characters")
Return
End If
If strPhoneNumber.Length = 12 Then
PassengerData += strPhoneNumber
Else
MessageBox.Show("Please enter a valid phone number")
Return
End If
PassengerDataList.Items.Add(PassengerData)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment