VBA Chapter 2 Beyond the Classroom 1

VBA Chapter 2 Beyond the Classroom 1

<p>VBA Chapter 2 Beyond the Classroom 1</p><p>The Instructions worksheet contains four buttons. You need to insert command buttons and assign name and caption properties. </p><p>Code the Attendees button to unprotect the Budget worksheet and then display the following input box to request information from the user. When the user enters the value and clicks OK, the procedure saves the user input in the appropriate cell in the Budget worksheet and then protects the Budget worksheet again. Code the Income button to unprotect the Budget worksheet and then display the Income form shown below. Create the form, set the control properties, and create a UserForm Initialization procedure that sets the focus to the first text box. Use the SelStart property, SelLength property, Len(.Text) function, and the SetFocus function so that when the text box receives focus, it also selects the existing text. Use Help to learn how to use these properties.</p><p>You need to bind the text boxes to the appropriate cells on the Budget worksheet so that they display current values and that when the user clicks OK, the new values are stored in the bound cells. Close the form and protect the Budget worksheet when the user clicks OK.</p><p>Code the Expenses button to display the Expenses form that you need to create. Bind the text box controls to the appropriate cells in the Budget worksheet. Declare variables for the attendees (obtained from the appropriate cell in the Budgets worksheet), cost of a chair usage per person, total calculated cost for chair rentals, meal per person, and total meal cost (calculated). Store the two calculated values in their respective cells in the Budgets worksheet. Close the form and protect the Budget worksheet when the user clicks OK.</p><p>Create a UserForm Initailization method to set the focus and select the existing value in the first text box when the form first loads. Code the Display Budget button to display the Budget worksheet. Create a button on the Budget worksheet that, when clicked, returns to the Instructions worksheet. Check all procedures to ensure correct unprotecting and protecting of the Budget worksheet. Users should not be able to directly enter or edit data on the Budget worksheet. All changes are made through the input box and forms.</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    4 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us