EXCEL VBA ABC company gives discount as follows: Purchase > $400                                                                     Discount rate = 5% Purchase between $300 and $400                                          Discount...

70.2K

Verified Solution

Question

Programming

EXCEL VBA

  1. ABC company gives discount as follows:
    Purchase > $400                                                                  Discount rate = 5%
    Purchase between $300 and$400                                         Discount rate = 4%
    Purchase >= $100 and <$300                                            Discount rate = 2%
    Purchase <100                                                                      No discount
    Purchase = Price * Quantity
    Discount = Purchase * Discountrate                                    
    Net Purchase = Purchase – Discount

Total Net Purchase is the runningtotal of Net Purchases

Create a user interface form as shown below. Use text boxes toinput price and quantity. Use labels to display the discount, netpurchase (purchase amount after discount) and total net purchases.Click calculate button to calculate and display discount, netpurchase, and total net purchases; click clear button to clearvalues from the text boxes and labels, except total net purchases;send the focus to the price text box.
Click exit button to end the application.

  1. Create a sub procedure in a module to calculate:
    a) the sum of even integers from 4 to 12 using DO WHILE. Displaythe sum in the message box. Name the sub procedure as Q2a.
    b) the sum of odd integers from 5 to 9 using FOR NEXT. Display thesum in message box. Name the sub procedure as Q2b.
  2. Create a sub procedure named as Question3 in a module tocalculate the value and total value of items using a Do/while Loop.Value = Price * Quantity. Total value is the running total ofvalues. Use INPUTBOX function to get the price and quantity.Display the value in the message box. Display total value in themessage box after exiting the loop. Loop is entered by inputting“Y” at the prompt “Do you wish to continue?” and exited by entering“N” at the prompt “Do you wish to continue?”
  3. Create a sub procedure named as Question4 in a module to findthe capital. Use INPUTBOX function to get the state and message boxfunction to display the capital.

State               Capital

MN                  St.Paul

WI                  Madison

TX                  Austin

Answer & Explanation Solved by verified expert
4.1 Ratings (720 Votes)
Answer Hey dear student find the solution ofyour query if you have any doubt feel free to    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students