Question
How to solve this code in VBA editior? Tasks to be performed: Create a local constant with the name commission rate and set it to
How to solve this code in VBA editior?
Tasks to be performed:
Create a local constant with the name commission rate and set it to 2.54%
Create a local variable with the name sales that will contain a sales amount in both dollars and cents.
Create a local variable with the name commission that will contain a calculated commission amount in both dollars and cents.
Using the InputBox function, assign the value entered to the sales variable. Use Enter the amount of commissionable sales as the prompt and Get Commissionable Sales as the title.
Calculate the amount for commission variable as the amount in the sales variable multiplied by the rate in the constant commission rate.
Create a message that will display the calculated commission at the end of the following sentence: The calculate commission is . After suppling the commission amount, end the sentence with a period. The message should only display the OK button and show Sales Commission as the title. Here are some hints to successfully complete this task:
You will need to use both the InputBox and MsgBox functions in this exercise.
You will need to use the Format function within the MsgBox function.
You will need to use the concatenation symbol to form the complete message to be used in the MsgBox. The first part will be the string message given in the instruction, the second part will be the formatted commission amount, and the last part will be a period. Each of these three parts can be combined together using the concatenation symbol in the code.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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