Write a vba code for a hotel program


Assignment:

1. Question 1:

Write VBA code for a hotel program. This program should accept four values for Guest ID, Guest name, number of nights, price per night, and total accommodation price from the user.

(a) Set the value of Guest Id in cell A1.
(b) Set the value of Guest name in cell B1.
(c) Set the value of number of nights In cell C1.
(d) Set the value of price per night in cell D1.
(e) Set the value of total accommodation price in cell E1.

Change the range A1 to E1 font color to yellow and the background color to red If the total accommodation price Is not correct, and font color to black and the background color to green if the total accommodation price is correct. (total accommodation price = price per night* number of nights)

2. Question 2:

Write VBA code program for a gym subscription plan. Allow the user to enter the number of months and the plan price. Assume that the user earns extra 20 percent discount every month, while the maximum discount is 60 percent. The program output is a schedule that lists each month's number in the gym subscription plan starting with month 1 and the user's savings at that month.

Solution Preview :

Prepared by a verified Expert
Management Information Sys: Write a vba code for a hotel program
Reference No:- TGS03155054

Now Priced at $45 (50% Discount)

Recommended (92%)

Rated (4.4/5)