Our teacher wanted us to set up a command button that gives 3 input boxes on city, state, and zip code. Next we are suppose to use a Boolean type and set a true or false setting depending on the zip code that's suppose to be 5 digits. Next we are to insert two message boxes one saying the zip code is valid and the other saying it's not using select case and the Boolean variable to help I need help I have no idea how to make these messages boxes and Boolean actually run

To set up a command button that gives 3 input boxes on city, state, and zip code, and then use a Boolean variable to validate the zip code and display message boxes based on the validation, you can follow these steps:

Step 1: Add a Command Button to your form
- Open the form in the Visual Basic Editor.
- Go to the Toolbox and select the Command Button control.
- Click and drag the Command Button onto your form.

Step 2: Set up the Command Button click event
- Double-click on the Command Button to open the code window for its click event.

Step 3: Declare the variables
- At the top of the code window, declare the variables you will need:
```
Dim city As String
Dim state As String
Dim zip As String
Dim isZipValid As Boolean
```

Step 4: Get input from Input Boxes
- In the Command Button click event, use the InputBox function to get the values for city, state, and zip:
```
city = InputBox("Enter the city:")
state = InputBox("Enter the state:")
zip = InputBox("Enter the zip code:")
```

Step 5: Validate the zip code
- Use the `Len` function to check if the zip code is 5 digits:
```
isZipValid = (Len(zip) = 5)
```

Step 6: Display message boxes using Select Case and Boolean variable
- Use the Select Case statement to display different message boxes based on the value of `isZipValid`:
```
Select Case isZipValid
Case True
MsgBox "The zip code is valid."
Case False
MsgBox "The zip code is not valid."
End Select
```

Now, when the Command Button is clicked, it will prompt the user to enter the city, state, and zip code. After that, it will validate the zip code and display a message box indicating whether the zip code is valid or not.

To set up the command button with input boxes for city, state, and zip code, follow these steps:

1. Open the Visual Basic Editor by pressing ALT + F11.
2. Insert a UserForm by clicking on "Insert" in the menu, then selecting "UserForm".
3. Add a CommandButton to the UserForm. You can do this by selecting the "CommandButton" control from the toolbox and drawing it onto the UserForm.
4. Right-click on the CommandButton, select "Properties" to open the Properties Window. Give it a relevant name, such as "btnValidate".

Next, let's add the code to validate the zip code and display the message boxes:

1. Double-click on the CommandButton to open the code window for the button's Click event.
2. Add the following code:

```vba
Private Sub btnValidate_Click()

Dim city As String
Dim state As String
Dim zipCode As String
Dim isValidZip As Boolean

city = InputBox("Enter city:")
state = InputBox("Enter state:")
zipCode = InputBox("Enter zip code:")

isValidZip = (Len(zipCode) = 5) ' True if zip code has 5 digits, False otherwise

Select Case isValidZip
Case True
MsgBox "Zip code is valid."
Case False
MsgBox "Zip code is not valid."
End Select

End Sub
```

In this code, we declare variables for city, state, zip code and an isValidZip Boolean variable. We use the InputBox function to gather the input from the user for city, state, and zip code.

The isValidZip variable is set to True if the length of the zipCode is equal to 5, and False otherwise.

Finally, we use the Select Case statement to display the appropriate message box based on the value of isValidZip.

After adding the code, save the UserForm and close the Visual Basic Editor.

You can now run your program and click the command button to see the input boxes and get the validation result in the message boxes.