Purchase Solution

Visual Basic for Applications (VBA) for Modelers - excel software 2

Not what you're looking for?

Ask Custom Question

Please refer to attached PDF documents for original questions.

2. Create a user form that contains the usual OK and Cancel buttons. It also should contain two sets of option buttons, each set placed inside a frame. The captions on the first set should be Baseball, Basketball, and Football. The captions on the second set should be Watch on TV and Go to games. Then write the event handlers and code in a module so that when the program runs, the user sees the form. If the user makes a couple of choices and clicks OK, he should see a message like, "Your favorite sport is basketball, and you usually watch on TV." If the user clicks Cancel, the message "Sorry you don't want to play." should appear.

3. Repeat the previous exercise, but now make the controls checkboxes, not option buttons. Change the message in case the user clicks OK to something appropriate, such as, "You like baseball and basketball, and you like to watch on TV and go to games." The message should be appropriate, regardless of which checkboxes are checked (including none being checked).

4. Create a user form that contains the usual OK and Cancel buttons. It should also contain a list box of the type where the user is allowed to select only one item from the list. Write a UserForm_Initialize sub that populates the list with the states Illinois, Indiana, Iowa, Michigan, Minnesota, Ohio, Pennsylvania, and Wisconsin (in this order), and selects Indiana by default. Then write the event handlers for the buttons and code in a module so that when the program runs, the user sees the form. If she chooses an item from the list and then clicks on OK, she should see a message such as, "You live in Ohio." If she clicks on Cancel, she should see the message, "You must not live in a Big Ten State."

7. The file Big Ten Teams.xlsx contains the school and mascot names for the Big Ten teams in a range named Teams. (It doesn't include Nebraska yet.) Create a user form that contains the usual OK and Cancel Buttons. It should also contain a list box of the type where the user is allowed to select only one item from the list. Set its RowSource property to Teams, so that the list box is automatically populated from the list in this range. Also, set its ColumnCount property to 2, so that schools and mascots both appear in the list box, and set its ColumnHeads property to True, so that each column has an appropriate heading. Write a UserForm_Initialize sub that selects Indiana by default. Then write the event handlers for the buttons and code in a module so that when the program runs, the user sees the form. If he chooses an item from the list and then clicks on OK, he should see a message such as, ''You must root for the Indiana Hoosiers." If he clicks Cancel, he should see the message, "You must not be a Big Ten fan." (Hint: In online help, look up the BoundColumn property of a list box and how it controls the Value property.)

Purchase this Solution

Solution Summary

The expert creates a user form that contains the usual OK and Cancel Buttons for visual basic applications for modelers.

Purchase this Solution


Free BrainMass Quizzes
Basic Networking Questions

This quiz consists of some basic networking questions.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

C# variables and classes

This quiz contains questions about C# classes and variables.