Documente Academic
Documente Profesional
Documente Cultură
Summary: In this Test Your Skills exercise you will be using Input Boxes, Message Boxes, Macros, and
Decision Structures to create an interactive worksheet. The worksheet will allow users to quickly filter
the Sales Report by Salesperson. If the user does not enter a name, or spell the name incorrectly, they
will receive a message box asking if they would like to try again. There is a button on the worksheet to
perform the filter, and another to clear the filter.
Remember: There are multiple ways to program in VBA. Your code might be slightly different than my
code.
5. Create the input box with the text, and title seen in the image on page 1.
7. Create the Decision Structure that will carry out the filtering.
You can use the FilterShephard, and FilterSmith macros as the filter criteria when you get
started, then create more filter criteria on your own.
REMEMBER: If the user does not enter a name, or spell the name incorrectly, they will receive a
message box asking if they would like to try again. If the user clicks Yes, then reopen the input
box. See message box on page 1 for verbiage.
Sub FilterBy()
Case "Shephard"
Call FilterShephard
Case "Smith"
Call FilterSmith
Case Else
If MessageAnswer = 6 Then
Call FilterBy
End If
End Select
End Sub