Our training courses

Other training resources

Our training venues

Why we are different

The different Wise Owl courses for VBA explained

We've split our introductory VBA training courses into a two-day Excel macros course and a two-day advanced VBA course (the latter also applies to Word, PowerPoint and other MS Office applications).  We also offer a three-day fast-track VBA course.

This page gives an idea of what you'll learn on our VBA courses, but you can see far more at our main VBA training courses page.

Excel VBA course

Our two-day introduction to VBA in Excel course will show you how to create basic macros, including selecting cells and declaring variables.  Here's an example:

Sub RecordVote()

 

'the name of each superhero

Dim HeroName As String

'the rating assigned to them

Dim HeroRating As Long

'go to the votes sheet and get the value of the superhero, and their rating

Worksheets("Votes").Select

HeroName = Range("C4").Value

HeroRating = Range("C6").Value

'go to top of results

Worksheets("Results").Select

Range("B4").Select

'go to first blank cell

ActiveCell.End(xlDown).Select

ActiveCell.Offset(1, 0).Select

'write variable values into this blank row

ActiveCell.Value = HeroName

ActiveCell.Offset(0, 1).Value = HeroRating

'copy formats from cell above (included here just to make macro complete)

Range(ActiveCell.Offset(-1, 0), ActiveCell.Offset(-1, 1)).Copy

ActiveCell.PasteSpecial xlPasteFormats

Application.CutCopyMode = False

End Sub

However, by day two you'll be writing some fairly ambitious macros, including looping over collections:

Sub CloseAllButCodeWorkbooks()

 

'a reference to each workbook in turn

Dim wb As Workbook

 

'for each of the open workbooks ...

For Each wb In Workbooks

 

'if it isn't this one containing the code (note that you can't directly compare two workbooks: instead, you must see if they have the same name)

 

If wb.Name <> ThisWorkbook.Name Then

'it's not the same - close it down, giving user a chance to save changes (this is the default)

wb.Close

 

End If

 

'now go on automatically to the next workbook

 

Next wb

 

End Sub

Advanced VBA course

Our two-day advanced VBA course is aimed at people who already know Visual Basic for applications, and want to learn about referencing other applications, using file dialog boxes, creating classes, passing arguments by reference or value, recursive programming and the like.  To give you a taste, here's the sort of macro you'll learn from the advanced VBA course:

Sub RequestLetter()

 

'try consuming your class!

Dim Guess As New clsLetterGuess

'keep guessing until letter guessed or too many goes

Guess.StartGuess

'display what was guessed

If Len(Guess.LetterGuessed) = 0 Then

MsgBox "No letter guessed"

Else

MsgBox "You guessed " & Guess.LetterGuessed

End If

'now get rid of the object (the garbage collector will

'do this anyway, so this line is not strictly

'necessary)

Set Guess = Nothing

End Sub

If you don't think this looks that complicated, bear in mind that clsLetterGuess is an object which we've created!

Three-day fast-track VBA course

This fast-track VBA course combines:

  • All of the topics from the two-day Introduction to Excel VBA course; and

  • Most of the topics from the two-day Advanced VBA course (the big omission is class modules, which notwithstanding the above we don't actually think are that useful in VBA).

The course is aimed at people who have a very good aptitude for VBA. 

Further programming training

If your ambitions lie beyond MS Office, you might like to consider our other programming courses:

See our VBA page for more details on all things to do with Visual Basic for Applications training.

This page has 0 threads Add a new post

Head office

Kingsmoor House

Railway Street

GLOSSOP

SK13 2AA

London

Landmark Offices

99 Bishopsgate

LONDON

EC2M 3XD

Manchester

Holiday Inn

25 Aytoun Street

MANCHESTER

M1 3AE

© Wise Owl Business Solutions Ltd 2024. All Rights Reserved.

End of small page here
Please be aware that our website uses cookies!
I'm OK with this Tell me more ...