Face to face / Online public schedule & onsite training. Restaurant lunch included at STL venues.
(551 reviews, see all 104,524 testimonials) |
From £289 List price £350
This course is suitable for advanced users of Microsoft Excel. If they are responsible for very large and variable amounts of data, or teams, who need to learn how to program features and functions to develop the accessibility and usability of their data.
A thorough knowledge of Microsoft Excel is required, or completion of our Microsoft Excel Advanced course.
Introducing Visual Basic for Applications
Why use VBA?
Recording and running macros
Absolute v relative cell selection
Working with the Visual Basic Editor
Creating your own code
Understanding and creating modules
Defining procedures
Calling procedures
Where to store macros
Making decisions in code
Using logical comparisons
The IF...ENDIF structure
The SELECT CASE...END SELECT structure
When to use IF v SELECT CASE
Repeating code with loops
The DO... LOOP structure
The FOR... NEXT structure
The FOR EACH... NEXT structure
How to debug problems with loops
Debugging errors
Defining errors
Setting breakpoints to pause execution
How to step through code
Working with break mode to spot errors
Identifying the value of expressions
Understanding Visual Basic
What is an Object?
Examining the Excel object hierarchy
Using the object browser
How to explore methods and properties
Getting help in VBA
Arguably, the most experienced and highest motivated trainers.
Training is held in our modern, comfortable, air-conditioned suites.
Modern-spec IT, fully networked with internet access
A hot lunch is provided at local restaurants near our venues:
Courses start at 9:30am.
Please aim to be with us for 9:15am.
Browse the sample menus and view joining information (how to get to our venues).
Available throughout the day:
Regular breaks throughout the day.
Contains unit objectives, exercises and space to write notes
Available online. 100+ pages with step-by-step instructions
Your questions answered on our support forum.
|
|
Summit Therapeutics (Oxford) Ltd
Oliver Taylor,
Financial Planning&Analysis Manager
Marius was very open and friendly. His delivery was clear and to the point. Very easy to follow and understand.
Excel VBA Introduction
Aspers Group
Amanda Rosowski,
Group Loyalty Programme Administrator
Our instructor noticed the class was more advanced than usual and gave the group a taste of some theory & formulae in the next level course. Was a great way to end the day!
Excel VBA Introduction
First Group
Steve Wilson,
Analyst
Very satisfied with the content and quality of the course - absolutely will recommend to colleagues.
Excel VBA Introduction
Next date | Location | Price |
---|---|---|
Mon 3 Nov | Online | £289 |
Fri 21 Nov | Limehouse | £294 |
Thu 18 Dec | Bloomsbury | £290 |
Fri 16 Jan | Online | £290 |
Fri 30 Jan | Bloomsbury | £290 |
Mon 23 Feb | Online | £290 |
And 21 more dates...
Loading content...
Excellent
HSBC
Project Manager
Alexander Orlov
"I was looking for a specific training for my data analytical team to equip them with more tools to slice and dice the data, building more trust worthy sophisticated propensity models, using SQL, VBA and Excel. I came across with STL training and my research and expectations were match by 100%. Spot on! Great professionals! Highly recommended for all banking and financial professionals that are using Excel on BAU basis."
Tutorials and discussions on MS Office
MS Office tips to save you time
MS Office shortcut keys for all versions
Handy info on industry trends
Latest news & offers
Loading content...
Below are some extracts from our Excel training manuals.
Procedure is a term that refers to a unit of code created to perform a specific task. In Excel, procedures are stored in objects called Modules. In this unit we will look at both Modules and Procedures.
Standard modules can be used to store procedures that are available to all forms, worksheets and other modules. These procedures are usually generic and can be called by another procedure while the workbook is open.
Within a project you can create as many standard modules as required. You should store related procedures together within the same module.
Standard modules are also used to declare global variables and constants. To create a standard module in the VB Editor:
A procedure is a named set of instructions that does something within the application.
To execute the code in a procedure you refer to it by name from within another procedure. This is known as Calling a procedure. When a procedure has finished executing it returns control to the procedure from which it was called.
There are two general types of procedures:
Sub procedures: perform a task and return control to the calling procedure
Function procedures: perform a task and return a value, as well as control, to the calling procedure
If you require 10 stages to solve a problem write 10 sub procedures. It is easier to find errors in smaller procedures than in a large one.
The procedures can then be called, in order, from another procedure.
There are rules and conventions that must be followed when naming procedures in Visual Basic.
While rules must be followed or an error will result, conventions are there as a guideline to make your code easier to follow and understand.
The following rules must be adhered to when naming procedures:
You should consider these naming conventions when naming procedures:
Following these conventions, here is an example of procedure names:
Most Excel tasks can be automated by creating procedures. This can be done by either recording a macro or entering the code directly into the VB Editor's Code window.
Sub procedures have the following syntax:
[Public/Private] Sub ProcedureName ([argument list])
Statement block
End Sub
Public indicates procedure can be called from within other modules. It is the default setting
Private indicates the procedure is only available to other procedures in the same module.
The Sub... End Sub structure can be typed directly into the code window or inserted using the Add Procedure dialog box.
To create a sub procedure:
The Add Procedure dialog box appears:
Function procedures are similar to built-in functions such as Sum(). They are sometimes called user-defined function.
A function returns a value to the procedure that calls it. The value the function generates is assigned to the name of the function.
Function procedures have the following syntax:
[Public/Private] Function FunctionName ([argument list]) [As
[Statement block]
[FunctionName =
End Function
Public indicates procedure can be called from within other modules. It is the default setting
Private indicates the procedure is only available to other procedures in the same module.
The As clause sets the data type of the function's return value.
To create a function procedure:
Display the Add Procedure dialog box (as in Creating a Sub Procedure):
The Add Procedure dialog box appears (as seen in Creating a Sub Procedure):
Below is an example of a basic function procedure:
A sub procedure or function is called from the point in another procedure where you want the code to execute. The procedure being called must be accessible to the calling procedure. This means it must be in the same module or be declared public.
Below is an example of calls to Sub and Function procedures:
When passing multiple arguments (as in the function procedure above) always separate them with commas and pass them in the same order as they are listed in the syntax.
Auto Quick Info is a feature of the Visual Basic that displays a syntax box when you type a procedure or function name.
The example below shows the tip for the Message Box function:
Arguments in square brackets are optional.
Values passed to procedures are sometimes referred to as parameters.
The Immediate window is a debugging feature of Visual Basic. It can be used to enter commands and evaluate expressions.
Code stored in a sub or function procedure can be executed by calling the procedure from the Immediate window.
To open the Immediate window:
The Immediate window appears.
To execute a sub procedure:
To execute a function and print the return value in the window:
To evaluate an expression:
Within the code, especially in loops, use the Debug.Print statement to display values in the Immediate window while the code is executing. The Immediate window must be open for this.
The Code editor window is used to edit Visual Basic code. The two drop down lists can be used to display different procedures within a standard module or objects' event procedures within a class module.
Object List | Displays a list of objects contained in the current module. |
Procedure List | Displays a list of general procedures in the current module when General is selected in the Object list. |
Setting Code Editor Options
The settings for the Code Editor can be changed. To do this:
The Options dialog box appears.
The following are explanations of the Code Setting selections:
Auto Syntax Check | Automatically displays a Help message when a syntax error is detected. Message appears when you move off the code line containing the error |
Require Variable Declaration | Adds the line Option Explicit to all newly created modules, requiring all variables to be explicitly declared before they are used in a statement. |
Auto List Members | Displays a list box under your insertion point after you type an identifiable object. The list shows all members of the object class. An item selected from the list can be inserted into your code by pressing the Tab key |
Auto Quick Info | Displays a syntax box showing a list of arguments when a method, procedure or function name is typed |
Auto Data Tips | Displays the value of a variable when you point to it with a mouse during break mode. Useful for debugging. |
Auto Indent | Indent the specified amount when Tab is pressed and indents all subsequent lines at the same level. |
The Windows Settings selections are explained below:
Drag-and-Drop Text Editing | Allows you to drag and drop code around the Code window and into other windows like the Immediate window. |
Default to Full Module View | Displays all module procedures in one list with optional separator lines between each procedure. The alternative is to show one procedure at a time, as selected through the Procedure list. |
Procedure Separator | Displays a grey separator line between procedures if Module view is selected |
Below are some useful guidelines to follow when editing code:
It is also a good idea to comment your code to document what is happening in your project. Good practice is to comment what is not obvious.
Start the line with an apostrophe ( ‘ ) or by typing the key word Rem (for remark). When using an apostrophe to create a comment, you can place the comment at the end of a line containing a code statement without causing a syntax error.
Call for assistance
We will call you back