the basics of programming with Visual Basic for Applications, or VBA. VBA allows
you to take ... Using Relative and Absolute References. Editing a Recorded ...
Advanced Excel – An Introduction to VBA A308SLL 1.
MODULE SUMMARY Aims and Summary Microsoft Excel is a powerful tool for analysing and presenting information. One of the strengths of Excel has always been its macro language. This module explores the basics of programming with Visual Basic for Applications, or VBA. VBA allows you to take your good Excel skills to a higher level. With VBA you can automate time-consuming tasks using macros. You will learn how to extend the built-in functions of Excel by writing your own. With VBA you can progress from producing spreadsheets purely for your own use to producing spreadsheet-based systems that can be used by others. The module is divided into three parts: Automating Everyday Tasks – explores practical methods to use macros in Excel. It also introduces the macro recorder and the VBA development environment. Exploring Objects – explores how VBA communicates with Excel. You will learn about objects by gaining practical experience of using some of the most important objects in Excel: Workbook, Worksheet and Range. Exploring Visual Basic – investigates how to use VBA to move beyond the limitations of a recorded macro. Students will learn how to use the Visual Basic Editor to write programs that make decisions based on user input and repeat actions in a loop. This module is designed for students who are very experienced with Excel as a user and now wish to progress to programming it. Students will learn to record, originate and edit macros, and gain an understanding of how to apply ‘best practice’ when writing VBA code. Due to the nature of the subject matter of this module and the hands on delivery, you are strongly advised to attend all sessions.
Module Size and Credits Module size
Half
CATS points
10
ECTS credits
5
Open / restricted
Open
Availability on/off campus
On
Total student study hours
100
Number of weeks
10
School responsible
School of Lifelong Learning
Academic Year
2010 / 2011
A308SLL/Advanced Excel./2010-11/MID V3.1 Page 1 of 5
Entry Requirements (pre-requisites and co-requisites) A good level of competency in using Excel - for example, comfortable using VLOOKUP and range names. Excluded Combinations None Composition of Module Mark (including weighting of components) 100% coursework Pass Requirements A module mark of at least 40% Special Feature None Course Stages for Which the Module is Mandatory None Course Stages for Which the Module is a Core Option None 2.
Teaching, Learning and Assessment
Intended Module The intended learning outcomes are that on completion of this module you should be able to:
LO1.
run macros in a variety of ways and explain the basics of a Visual Basic Module;
LO2.
create macros that interact with the user;
LO3.
write procedures that execute one or more lines of code repetitively;
LO4.
write procedures that test conditions and then run only certain statements based on the results.
Indicative content
Make a Macro Do Simple Tasks How Visual Basic for Applications Talks to Excel Creating a Simple Macro Using Relative and Absolute References Editing a Recorded Macro Using various methods of running a Macro Make a Macro Do Complex Tasks Validating User Input A308SLL/Advanced Excel./2010-11/MID V3.1 Page 2 of 5
Explore Microsoft Excel's Object Library Using the Locals Window to Learn About Objects Using the Immediate Window to Learn About Objects Using Help to Learn About Objects Using IntelliSense to Learn About Objects Using the Object Browser to Learn About Objects Explore Range Objects The concepts of Object, Method and Property Enhancing Recorded Selections Ways of specifying a Range Exploring Ranges Exploring Formulas Investigate Debugging Methods Know a variety of debugging methods Control the execution of a macro Select and use the appropriate debugging method Understand Variables Know when to use variables and when to use cell data Assigning values to cells and to variables Explore the major types of variables Understand variable limitation Visual Basic Programming Elements Using Conditionals Creating Loops Managing Large Loops Improving the Quality of Code Using indentation to reveal code structure Using comments appropriately Choosing meaningful variable names Block indent using the VBA Editor Changing recorded macros to make them more efficient Shortening recorded macros to improve readability Writing high quality applications The importance of good error handling and how to implement it Using forms for improved usability Securing applications Providing help and feedback Teaching and Learning Methods Activity
Indicative Hours
Lectures/Tutorials
20
Independent Study
45
Assessment Activities
35
The course is essentially participatory, incorporating small and large group discussions, skills practice, and personal development exercises. The aim of the weekly sessions is to both introduce new topics to the student and to reinforce learning from previous weeks. Each week, the tutor will demonstrate specific concepts, with A308SLL/Advanced Excel./2010-11/MID V3.1 Page 3 of 5
step-by-step guidance combined with discussion of previously produced examples. Students will practice each new concept learnt during a session before another skill is introduced, and the session will be prefaced with a short discussion of the business and professional context in which the learning takes place. These concepts will be supported by on-line tutorials designed to both support existing learning and to offer developmental opportunities. Handouts will be made available online to students in PDF format. Additional resources will be made available on-line to support the student’s understanding of the context (e.g. commercial) in which the learning takes place. Students will be strongly encouraged to use the on-line discussion forum to supplement their learning during non-class time. Students will be required to apply the skills and concepts presented during the lecture in the development of relevant material both as work in progress and for assignment submission. Unsupervised time will be required to be spent on a variety of activities managed by the students, which will include the completion of assessment work, further reading, thinking, planning and for skills practice.
Method of Assessment Summative Assessment You will submit a portfolio consisting of five tasks. The tasks list will be issued based upon examples and will be given to you after the first four session have been completed. The tasks will allow you to demonstrate understanding of the elements covered during the module. This work will summatively assess Learning Outcomes 1 to 4 inclusive. Formative Assessment A series of on-line formative assessments will be made available to you that will support your understanding of the Excel skills being studied in this module. Other Points Students who fail to submit coursework will not automatically be considered for a re-sit. When a student is eligible for re- assessment, revised coursework will be set, to meet the needs of the failed coursework component(s) unless otherwise advised
Date of Last Amendment September 2010 3.
MODULE RESOURCES
Recommended Reading Green, John, (2001) Excel 2002 VBA Programmer’s Reference Wrox (or the 2007 version but not the 2003) (This book is a standard text and includes a complete reference to the Excel VBA object model.) Reddick VBA Conventions http://www.xoc.net/standards/default.asp (A free resource that introduces one of the better naming conventions and often used by professional Excel VBA programmers)
Essential Reading A308SLL/Advanced Excel./2010-11/MID V3.1 Page 4 of 5
Jacobson, R (2007) Microsoft Office Excel 2007, Visual Basic for Application Step by Step, Redmond: Microsoft Press
Required Equipment Students will utilise relevant software and hardware during classroom session. It is also expected that students will have access to their own relevant IT resources, including relevant software, hardware and Broadband/High Speed IT connections, for further study outside of the classroom.
4.
MODULE ORGANISATION Module Leader
Joy Monkhouse
Name
School of Lifelong Learning
Room
JAG16
Telephone Number
02477 653115
E-mail
[email protected]
Subject Quality and Approval Information Board of Study
Lifelong Learning (LL)
Subject Assessment Board
Lifelong Learning (LL)
Shortened Title
Excel VBA
Date of Approval by Board of Study
10th March 2010
A308SLL/Advanced Excel./2010-11/MID V3.1 Page 5 of 5