Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a macro that will ask for the number of gadgets needed and assign the valu

ID: 640499 • Letter: W

Question

Write a macro that will ask for the number of gadgets needed and assign the value to an integer variable. Then have the macro ask for the amount of raw material needed to make one gadget and assign this value to a single variable. Furthermore, add another box to ask for the amount of raw material available to manufacture gadgets and assign this number to a single variable. In your VBA code check that the number of gadgets needed per unit and the amount of raw material available are entered correctly (i.e., make sure that it is a number). If any one of the entries is not a number, print a message with an exclamation sign indicating that there was an error and terminate the macro. If the entries are numbers then calculate the number of gadgets that can be manufactured. If the number of gadgets that can be manufactured is greater than or equal to the number of gadgets needed, display a message indicating the number of gadgets that can be manufactured indicating the demand can be met. Otherwise display a message indicating that the raw material is not enough to manufacture the number of gadgets needed and inform the user the number of gadgets that can be manufactured with the available raw material. (See sample boxes below).

Place a command button on Sheet1 that calls your macro.

Make sure that some queries/prompts are displayed as in the samples shown here, use line continuation

Explanation / Answer

In $ A Particulars Old New Differential Income Annual Net Annual Net Annual Net Depricitaion               (23,500)            (235,000)                 (42,000) (420,000)     (18,500) (185,000) Annual Variable Production Cost for 10 years                 (7,500)               (75,000)                   (3,900)     (39,000)          3,600        36,000 Proceeds from Old Machinery                          -                            -                               -          90,000                 -          90,000 Differential            (310,000) (369,000)     (14,900)     (59,000) B Sunk Cost $ Cost of New Equipment               420,000 Accumulated Depriciation               145,000 Total               565,000

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote