Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Build these into your VBA code: Use IF statements in the coding: If a user clicks the button without selecting the Account Manager, the Message
Build these into your VBA code:
Use IF statements in the coding:
- If a user clicks the button without selecting the Account Manager, the Message Box (Msgbox) should display “Choose an Account Manager from the first combo box”; and stop executing the code (Use Exit Sub)
- If a user clicks the button without selecting the Product Category, the Message Box should display “Choose a Product Category from the second combo box” and stop executing the code. Make sure to declare two variables (one variable to save Account Manager’s name and another to save Product Category). Example: Dim AccountManager as String You will only need two lines of filtering code; one that filters on the Account Manager criteria and another line of code that filters on the Product Category criteria.
Do not create any more lines of code for these 2 criteria. Instead, make sure these two lines of filtering code dynamically filters on the Account Manager criteria and the Product Category criteria (Hint: Make a reference to the two variables you would have declared).
Once the data is filtered, a message box must display a message to the user. This message must include the Account Manager’s name and the Product Category on which the data is filtered.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
VBA code Button Private Deputy Command 1 Press ComboBox1AddItem vps ComboBox1AddItem ggg ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started