Write a vba code for a hotel program


Assignment:

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 Al.

(b) Set the value of Guest name in cell Bl.

(c) Set the value of number of nights in cell Cl.

(d) Set the value of price per night in cell Dl.

(e) Set the value of total accommodation price in cell El.

(f) Change the range Al to El 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)

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.x

Solution Preview :

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

Now Priced at $45 (50% Discount)

Recommended (98%)

Rated (4.3/5)