Visual Basic Assignment
CIVL 205 Computer Applications in Engineering Fall 2014
Project (Assignment 9) Due: Varies
Objectives
1 - To become more familiar with building User Forms
2 – To create your own program.
3 – To get familiar with Power Point (other software must be approved)
4 – Practice presenting your work
Assignment:
1. Decided on a topic requiring a computer application that includes Excel programming features. Begin
the layout and basic structure of the project in class today by laying out tables, equations, user input and
output. Try to complete the brainstorming portion of this task today. Your task is to create a Visual Basic Applications, VBA program that reads requested input values and
displays the requested results in a user-friendly interface. You are required to include the following,
Worksheet 1 in Excel will provide an introductory statement about the program, illustrations, graphs, output data results and a button to initiate the macro.
The user will only interface with the VBA UserForm programming objects.
The program will not rely on Excel functions to produce results. All calculations shall be executed within the Visual Basic code.
Your program must incorporate Do Loops and If – Then – Else statements.
Tables will be permitted in worksheets for program referencing; however, they will be placed on worksheets other than the first sheet as required.
Name the worksheets appropriately. Topics you may select for your program are listed below. Other thoughts may be submitted to instructor
for consideration and approval prior to commencing with the assignment.
1. Horizontal alignment for roadway. 2. Vertical alignment for roadway. 3. Volume calculations by two methods. 4. Beam design program 5. Body-in-motion; distance, velocity and acceleration. 6. Statics of distributed forces; cables, beams, centers of mass. 7. Work – Energy and motion.
2. Develop a unit converter to convert both force and length from SI units to US customary units and vice
versa. Program Requirements: Units to convert:
Force conversion units: Length conversion units:
SI – N and kN SI – mm, cm, m, and km
US – lbs and Kips US – in, ft and mile
The program should convert from any unit option in one system to any option in the other unit system.
For example, if you start with inches, the user should be able to convert this to mm, cm, m, or km.
A Do loop that allows the user to convert more than one value without having to rerun the program.
Userforms to collect the user’s choices on what to convert. Userforms should contain (not all required in one userform):
CIVL 205 Computer Applications in Engineering Fall 2014
o Listboxes o Textboxes o Optionbuttons
Return to the spreadsheet a “final report” the shows all the values converted with the original value and units and the converted value and units..
Create separate Sub functions for each conversion and call these from a main program – Calling a Procedure for example.
Clear directions for the user to follow. Clear documentation of the code is required.
Your work is to be presented by Power Point or other pre-approved software the final two weeks of class
and must include the following:
1. 5 Minutes in duration 2. Explanation of why you chose your subject 3. How it is useful to the user 4. How it works 5. Graphs and Figures 6. How this class has helped you for future Engineering