Zip Code Program (Visual Basic)

Burke, Brendan J 141 Reputation points
2022-04-06T21:56:42.753+00:00

190647-zip-code-directions.jpg190683-zip-code-designer-window.jpg190705-zip-code-code-editor-window.jpg

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.

VB
VB
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
    2022-04-07T02:25:52.933+00:00

    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"  
            Else  
                lblStatus.Text = "Invalid Zip"  
            End If  
            txtZip.Focus()  
        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