Question: USING VBA EXCEL AND OPTION EXPLICIT Write a program to compute the price of renting an animal from Ulmas Ungulates. You can rent either a

USING VBA EXCEL AND OPTION EXPLICIT

Write a program to compute the price of renting an animal from Ulmas Ungulates. You can rent either a llama, or a camel. The price depends on:

Which animal you choose.

How far you want to ride the aminal.

Whether you want to rent a saddle as well.

The worksheet starts like this:

USING VBA EXCEL AND OPTION EXPLICIT Write a program to compute the

The user fills in the three fields above the Run button, and clicks Run. Heres some output:

price of renting an animal from Ulmas Ungulates. You can rent either

Heres another sample:

a llama, or a camel. The price depends on: Which animal you

Validate all the input, using the following rules:

The animal input must be either L or C. Case doesnt matter. Use trim() to remove unwanted spaces.

The number of miles must be numeric, and between 3 and 50 inclusive.

Saddle is either Y or N. Case doesnt matter. Use trim() to remove unwanted spaces.

If there are any input errors, show a message, and end the program. For example:

choose. How far you want to ride the aminal. Whether you want

to rent a saddle as well. The worksheet starts like this: The

Output the full name of the animal, the warning, and the cost.

Llamas cost $20 per mile.

Llama saddles rent for $120.

Camels cost $12 per mile.

Camel saddles rent for $180.

1 Animal code: 2 Lor C Miles: 6 Saddle? 7 Y/N 10 11 Animal: 12 Warning 14 Cost: Run

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!