Zip Code Program (Visual Basic)

Burke, Brendan J 141 Reputation points


The Instruction Docs is the main document that will lead to what I need in my Code editor window which when I run the application should be able to do in the designer window.

An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,627 questions
{count} votes

Accepted answer
  1. Jiachen Li-MSFT 27,581 Reputation points Microsoft Vendor

    Hi @Burke, Brendan J ,
    Please check the following document to learn about the usage of like operator.
    Like Operator (Visual Basic)

    And the answer should be like the following code.

        Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click  
            If txtZip.Text Like "4210*[2-4]" Then  
                lblStatus.Text = "Valid Zip"  
                lblStatus.Text = "Invalid Zip"  
            End If  
        End Sub  

    Best Regards.
    Jiachen Li


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful