+ All Categories
Home > Documents > Company Report - Database Manual -- Abayomi Ogunleye

Company Report - Database Manual -- Abayomi Ogunleye

Date post: 11-Apr-2017
Category:
Upload: yomi-ogunleye
View: 87 times
Download: 4 times
Share this document with a friend
12
Health & Safety Department (Wyman Gordon European Operations) Database Manual (Company Report) Abayomi Ogunleye (Yomi) STEP Classic Placement Programme 04 July - 31 August, 2011
Transcript
Page 1: Company Report - Database Manual -- Abayomi Ogunleye

Health & Safety Department (Wyman Gordon European Operations)

Database Manual (Company Report)

Abayomi Ogunleye (‘Yomi) STEP Classic Placement Programme

04 July - 31 August, 2011

Page 2: Company Report - Database Manual -- Abayomi Ogunleye

© 2011 Health & Safety Database Manual: Wyman Gordon Livingston 2

Special Thanks goes to The Bright Business Partnership Ltd, Step Enterprise Ltd, Wyman Gordon Livingston

and its entire staff, for making this placement a success.

Page 3: Company Report - Database Manual -- Abayomi Ogunleye

© 2011 Health & Safety Database Manual: Wyman Gordon Livingston 3

INTRODUCTION: PROJECT OVERVIEW

The main aim of this project was to re-design the structure and functionality of an existent management

information system for stability, intuitiveness and flexibility. The sole application used for this project is the

Microsoft Excel 2003 Suite alongside the object-oriented programming language Visual Basic (or Visual Basic

for Applications). Intuitiveness and flexibility of the system has been made possible with the use of in-built

Excel functions as well as the Visual Basic API1. This report contains detailed explanations on how the system

has been designed, how such design has been implemented to bring about optimum functionality of the system

and possible improvements that can be made to the system to make it more expandable and user-friendly.

STRUCTURE: BEHIND-THE-SCENES

The detailed structure of the management information system is illustrated below:

• Health & Safety Master Monitor

• Health & Safety Control Monitor

• Health & Safety Action Monitor

• Environmental Monitor

• Employee List

• Area List

Fig 1.1 – Structure of the Health and Safety Management Information System showing relationships between worksheets

1 API – Application Programming Interface

H&S

ACTION

MONITOR

EMPLOYEE

LIST

ENV

MONITOR

H&S

CONTROL

MONITOR

H&S

MASTER

MONITOR AREA

LIST

Page 4: Company Report - Database Manual -- Abayomi Ogunleye

© 2011 Health & Safety Database Manual: Wyman Gordon Livingston 4

Health & Safety Master Monitor

The main worksheet of the system where all finalised results from other worksheets is displayed. As seen from

the above illustration, it has been structured in a way to receive automatic updates of Task Statuses from the

“H&S Control Monitor” (the process under “Relationships” explains this further). Two drop-down menus are

featured in this worksheet, they are: the “Area” and “Owner” menus, data is sourced from the “Area List” and

“Employee List” worksheets respectively. Also included is a bar graph representing statistics of action statuses

in all departments in the organization.

Health & Safety Control Monitor

This is the most interactive worksheet in the system with only two columns, “Report No.” and “Brief

Description”, where it is a requirement to insert raw data. Features and functions such as: the “UPDATE”

button for making changes dependent upon actions from the “H&S Action Monitor”, Switch-able Options (Yes

or No) for the “RIDDOR Reportable” and “LTA”2 columns, Calendar Widget for two columns of date entries

and drop-down menus similar to the “H&S Master Monitor”, Task-Breakdown columns for automatic updates

of statuses of each task associated with a reportable incident. In addition, it is a key worksheet in the system

mainly because it bridges the gap between the master monitor and the action monitor worksheets. VBA3 codes

have been implemented for most of the functions in this sheet to make it very dynamic e.g. Calendar Widget,

Switch-able Options and “Update” button.

Health & Safety Action Monitor

There are a few similarities between this worksheet and the “Health & Safety Control Monitor”. Each

reportable incident recorded in the latter also appears here in the form of a drop-down menu box. An incident is

then further broken down into one or more sub-tasks which are fed back to the “Health & Safety Control

Monitor” using the counter function. All but the “Switch-able Options” column are present in this worksheet.

Environmental Monitor

This worksheet deals with incidents regarding the environment e.g. environmental hazards. Also, features like

the Calendar Widget, “Employee List” drop down menu, clickable option (to indicate that proper actions have

been taken to resolve an incident) i.e. the action has been successfully completed.

Employee and Area Lists

Simply contains all data of departments and employees present in the company. Any information altered in

these worksheets automatically updates in linked worksheets (as illustrated in the structural diagram). The lists

are represented as drop-down menus in linked worksheets in the system,

RELATIONSHIPS

All five worksheets in the database have one or more relations. The “Health & Safety Master” is the main

worksheet where all end-results are outputted. In order to achieve this, the “Health & Safety Monitor” and

“Health & Safety Action Monitor” worksheets have to communicate seamlessly with each other. The main

relationships in the system are elaborated upon below:

2 “LTA” stands for “Loss Time Accident”

3 VBA is Visual Basic for Applications

Page 5: Company Report - Database Manual -- Abayomi Ogunleye

© 2011 Health & Safety Database Manual: Wyman Gordon Livingston 5

1.) Health & Safety Monitors: Master, Control & Action

As mentioned in the previous paragraph, this three-way relationship is the back-bone of the system as a

whole. The diagram below illustrates this:

Status Columns as represented in the “H&S Master Monitor” worksheet

Task – Breakdown column as represented in the “H&S Control Monitor” worksheet

Task Columns as represented in the “H&S Action Monitor”

Fig 2.1 – Health & Safety Monitors: Master, Control & Action

In addition, the master sheet provides the area names to the action monitor by default. So, if an area name is

altered in the master sheet, this change is consequently reflected in the action monitor.

Page 6: Company Report - Database Manual -- Abayomi Ogunleye

© 2011 Health & Safety Database Manual: Wyman Gordon Livingston 6

2.) Area and Employee Lists

Fig 2.3 – The relationships between Area List, Employee List and H&S Master Monitor worksheets

Note:

When either an area or employee name has been altered in their respective list worksheets, they have to be

selected from the drop-down menu before the change is reflected in other tables. Excel doesn’t automatically

change the names already selected prior to a change. Example: If “Maintenance” in the Area List has been

changed to “Main.”, for this change to be reflected in master worksheet, the drop-down menu has to be selected

to choose the up-to-date name.

Page 7: Company Report - Database Manual -- Abayomi Ogunleye

© 2011 Health & Safety Database Manual: Wyman Gordon Livingston 7

TWEAKING

With regards to tweaking, the visual basic editor has to be used. This can be accessed by right-clicking on any

worksheet on the worksheet toolbar then selecting the View Code option from the dialogue box. Thereafter, the

Microsoft Visual Basic Editor window appears. Here is an illustration of the above process:

Fig 3.1 – “View Code” option

Fig 3.2 – The Microsoft Visual Basic Editor

Page 8: Company Report - Database Manual -- Abayomi Ogunleye

© 2011 Health & Safety Database Manual: Wyman Gordon Livingston 8

There are certain functions that can be altered in the system and they are:

• Automatic Counter (this function can be altered without using the Visual Basic Editor)

• Calendar Widget

• Switch-able Options

• Update Button Function

Automatic Counter

{=SUM(IF('H&S Control Monitor'!$E$4:$E$1000='H&S Master

Monitor'!$B8,IF('H&S Control Monitor'!$Q$4:$Q$1000="Completed",1,0),0))}

{=SUM(IF('H&S Action Monitor'!$B$4:$B$5005='H&S Control

Monitor'!$C4,IF('H&S Action Monitor'!$F$4:$F$5005="Completed",1,0),0))}

Fig 3.3 - Formulas for Counters in H&S Master and Control Monitors

The two formulas show how the counters in the master and control monitors are incremented. Before the

counter updates figures in the any of the worksheets, checks are done to make sure all criteria match.

Extension of the Automatic Counter Formula:

To extend this formula to a new cell, this has to be done:

• Select the cell on the row before containing the formula e.g. if the cell you are extending the formulae to

is cell C5 then select cell C4, then move the mouse cursor to the bottom right corner until a plus sign is

visible. Click and drag to the next cell. Voila! The formula appears in the new cell. Note: This can also

be done to a previous cell, simply click and drag upwards to extend the formula.

OR

• Copy and paste the formula in the formula bar of the required cell. Then press the following keys on the

keyboard to enable the formula (Note: If this is not done the formula would not work at all):

CTRL + SHIFT + RETURN (ENTER)

After enabling the formula, the automatic counter functions as normal.

N.B.: Remember to change the name of the cell in the formula to the current cell it’s been placed in. Using the

above example (second formula), $C4 should be changed to $C5 if C5 is the cell the formula has been

inputted in or extended to.

Calendar Widget

This feature makes it easier for users of the system to input dates in a worksheet rather than typing explicitly

(prevents errors). There are three worksheets in the database that make use of the calendar widget and it can be

further extended to other worksheets (or columns) if need be.

Extension of the Calendar Widget:

To extend the calendar widget, the VBA code in Fig 3.4 has to be copied and pasted in the new worksheet.

Once this has been done, the column range has to be changed to the one suited to the user. For instance:

Page 9: Company Report - Database Manual -- Abayomi Ogunleye

© 2011 Health & Safety Database Manual: Wyman Gordon Livingston 9

In the diagram below, the range is “E6:E1000”. If the column range required for the widget is, say “P1:P500”,

the code in Fig 3.4 (line 8) should be changed to:

If Not Application.Intersect (Range (“P1:P500”), Target)...

If it is to be added to more than one column, say P, Q and R, then this has to be done:

If Not Application.Intersect (Range (“P1:P500, Q1:Q500, R1:R500”), Target)…

On completion of this, the program has to be run by clicking the play button on the standard toolbar.

Subsequently, the change can be saved.

Fig 3.4 – VBA code extract showing the functionality of the Calendar Widget

Fig 3.5 - Excel Worksheet showing the Calendar Widget

Page 10: Company Report - Database Manual -- Abayomi Ogunleye

© 2011 Health & Safety Database Manual: Wyman Gordon Livingston 10

Switch-able Options

The action is performed by double-clicking a cell enabled by this function. The screenshot below shows

columns “F” & “G” and/or “I” & “J” having the options YES (Y) OR NO (N) respectively. On double-clicking

one of the rows under these columns, the opposite column gets blank while the selected row is filled with a

colour (either red or green in this case) and the letter “Y” or “N”.

N.B.: Once this function is enabled, the worksheet becomes disabled (un-editable). So in order to input

raw data, the formula bar has to be used!4

Fig 3.6 - Excel Worksheet showing the switch-able options in the H&S Control Monitor

Fig 3.7 – VBA Code Extract showing how the switch-able option feature has been implemented

4 Formula Bar – the editable bar just above the worksheet(s) with an fx symbol

Page 11: Company Report - Database Manual -- Abayomi Ogunleye

© 2011 Health & Safety Database Manual: Wyman Gordon Livingston 11

Update Button

As described previously in this report, activation of the “UPDATE” button automatically changes the status of

an incident recorded in the “H&S Control Monitor”. Tweaking this to make updates affect additional rows can

be done. In Fig 3.9, the second line of the VBA code states thus:

For r = 4 To 1000

In this case, r refers to the number of rows present in that function. Simply by altering the figures, the rows

can be extended or even shrunk depending on the task to be performed. An example could be:

For r = 1 To 65000 OR For r = 1 To 4

Fig 3.8 – “UPDATE” button: Changes status according to information got from the “H&S Action Monitor”

Fig 3.9 – VBA code extract showing how the “UPDATE” button has been implemented

Page 12: Company Report - Database Manual -- Abayomi Ogunleye

© 2011 Health & Safety Database Manual: Wyman Gordon Livingston 12

CONCLUSION

In summary, the system as a whole meets the requirements of the Health & Safety department at Wyman

Gordon, Livingston. Prior to the commencement of the project, the system lacked an edge in terms of flexibility

and concurrency but now all that has been improved upon. The system is capable of sending and receiving data

seamlessly between worksheets which betters accuracy and reduces ambiguity of information. The system can

still be improved upon regarding the software used to input data. A good recommendation would be to update

the existing Microsoft Excel 2003 to the latest version, Microsoft Excel 2010. Doing this will bring about more

options for simplifying tasks and also provide a very intuitive user-interface. Regardless, the newly developed

system is capable of doing task currently required by the department. Finally, I have included a list of references

to this report of where I got knowledge on how to tackle the project. The most informative resource in my own

opinion is the “Guide 39 (Version 1.0): Introduction to using macros in Microsoft Excel 2003”, it gives basic

steps on how to deal with macros5 as well as using VBA to optimise the functionalities of Microsoft Excel. The

Microsoft Office website (http://office.microsoft.com) is also an excellent resource.

REFERENCES

De Bruin R. (2010), Use the Calendar control to fill in dates: How do I insert a Calendar control in my

worksheet? Date retrieved: 27th

July 2011 from the World Wide Web, http://www.rondebruin.nl/calendar.htm

Excel Macros & Programming. (2011), Excel Macros (VBA): For Beginners, Intermediate and Advanced Users

Date retrieved: 14th

July 2011 from the World Wide Web, http://www.excel-vba.com/index.htm

ITS (2006), Guide 39 (v. 1): Introduction to using macros in Microsoft Excel 2003. University of Durham

Information Technology Service; Date retrieved: 9th

July 2011 from the World Wide Web,

http://www.dur.ac.uk/resources/its/info/guides/39Excel2003Macros.pdf

Microsoft Office: Office.com (2011), Excel 2003 Help and How-to. Date retrieved: 20th

July 2011 from the

World Wide Web, http://office.microsoft.com/en-us/excel-help/CL010057150.aspx?CTT=97

MSDN: Microsoft Developer Network (2011), Visual Basic and Visual C#. Date retrieved: 8th

August 2011

from the World Wide Web, http://msdn.microsoft.com/en-us/library/dd642420.aspx

The Closet Entrepreneur: The diy source for entrepreneurs! (2007), How to Color a Cell with a Double-Click in

Excel. Date retrieved: 11th

August 2011 from the World Wide Web, http://theclosetentrepreneur.com/how-to-

color-a-cell-with-a-double-click-in-excel

5 “A macro is a set of instructions that tells Excel what to do” (ITS, 2006: 1)


Recommended