VBA in Excel - Part 1

Following on from the Macros course look at how you can write your own Visual Basic code within Excel to fully automate tasks and save time.

Course overview

Duration: 2 days (13 hours)

Our VBA in Excel course is an introduction to using the Visual Basic for Applications language for programming in Excel. It looks at structures, syntax and coding standards.

This course is designed for existing experienced users of Excel who can record and run macros and those who have dabbled in VBA but would like some formal training and help to put some structure to their code.

Objectives 

By the end of the course you will be able to:

  • Write visual basic procedures
  • Create event and general procedures
  • Use commands from the Excel data model
  • Use statements and functions
  • Use a selection of debugging tools
  • Create and use variables and constants
  • Use different types of loops
  • Create an Excel user form

Content

The VBA environment  
  • Project explorer
  • Excel objects
  • Modules
  • Properties window
  • Code window
Code structure
  • Code structure
  • Navigating within your code
  • Adding comments
  • Using WITH
  • Steps to creating a VBA procedure
Procedures 
  • Sub procedures
  • Event procedures
  • Calling procedures
The Excel data model 
  • Workbook commands
  • Worksheet commands
  • Excel selection methods
  • Data manipulation commands
Debugging 
  • Using breakpoints
  • Stepping through code
  • The immediate window
  • The watch window
  • The locals window points
Variables and Constants 
  • Declaring variables
  • Declaring multiple variables
  • Variable data types
  • Concatenation
  • Scope of variables
  • Constants
  • Declaring constants
  • Using constants
  • Scope of constants
Looping 
  • Do while loops
  • Do until loops
  • For next loops
Conditional Statements
  • IF statement
  • SELECT CASE statement
  • Comparison statements
  • Logical operators
Creating a User Form
  • Form layout
  • The control toolbox
  • Naming conventions
  • Adding objects
  • Naming objects
  • Captions
  • Displaying the form
Object properties
  • Object properties
  • Setting properties at design time
  • Setting properties at run time
Interconnectivity between the user form and Excel
  • Comparing values
  • Transferring information
  • Running code

Discover more about our courses

Public Training Programme

Explore our current selection of public courses, available as convenient and cost-effective virtual sessions.

Engage with expert instructors and a diverse peer group in an interactive, online learning environment.

Ideal for those valuing flexibility and affordability, our public courses are ideal where you only have small numbers requiring training and offer training from the comfort of your home or office.

Check public dates

View our full catalogue of Leadership, Personal Development, Systems, Office Applications and Project Management courses

View our Leadership and Personal Development course catalogue
View our Systems and Office Applications course catalogue
View our Project Management course catalogue

Get in touch

Contact us

Do you have questions, suggestions, or feedback? We value your input and are here to assist you. Please don't hesitate to get in touch with us via email or phone:

Our dedicated team is ready to respond to your enquiries and provide the support you need. Feel free to reach out, and we'll do our best to assist you.

Thank you for visiting our website, and we look forward to hearing from you!