Learn from the Wise Owl VBA guru!

Trying to learn to write VBA macros in Excel?  Our Andrew Gould has packed most of what he knows about VBA into a single, must-have book:

VBA Excel book

Over 340 pages of VBA goodness!

Read on to discover why this is the best book you can buy if you're teaching yourself to program in VBA in Excel (you'll also find out how to purchase it).

If you don't care about the details and you just want to purchase a copy you can do so here!

About the author

Andrew is uniquely well-placed to write this book.  Not only does he have an encyclopaedic knowledge of VBA (memorably, he rewrote the Flappy Bird app entirely in VBA - check out Flappy Owl), but he's also not bad at passing this knowledge on, in the form of classroom training, videos and blogs:

Medium Notes
Classroom Andrew has run 176 classroom courses on VBA in the last 10 years, training 705 people in total.
Videos Author of 76 separate videos on VBA and 20 on VBA user forms, all viewable through this site.
Blogs Co-author (with me, as it happens) of an entire VBA tutorial (also viewable on this site).

Any computer book requires two ingredients, rarely found in the same person:

Computer book recipe

The recipe for a perfect computer book: mix expertise with the ability to pass it on.

 

Wise Owl are uniquely well-placed to offer this book on learning VBA in Excel (and who knows, there may even be others in the future).

About the book

Here's the front cover of our Introduction to Excel VBA book:

Introduction to Excel VBA

The book offers an introduction to writing macros in Visual Basic for Applications within Excel (although as you'll see if you scroll down, it actually goes well beyond an introduction).

 

Here are the contents:

Chapter Title Pages
1The Visual Basic Editor6
2Writing Simple VBA Code14
3Saving and Opening Files6
4Running VBA Code8
5Basic User Interfaces8
6Workbooks and Worksheets10
7Working With Ranges14
8Colours in VBA2
9Displaying Messages6
10User Inputs10
11Variables and Data Types12
12Constants and Enumerations4
13Working with Data10
14Testing Conditions10
15For Next Loops4
16Conditional Loops4
17How VBA Works12
18For Each Loops6
19Modular Code, Parameters and Functions10
20Recursive Programming4
21Debugging10
22Handling Errors12
23Arrays8
24Events14
25Creating User Forms14
26Running User Forms4
27Adding Code to Forms12
28Advanced Form Controls16
29Controlling Other Applications16
30Shapes18
31Connecting to Databases14
32Files and Folders8
33File Dialog Boxes6
34Class Modules12
35Collections and Dictionaries12
36VBA Quick Reference6

The book comes with a full table of contents at the beginning and index at the end, and is printed on A4 paper, double-sided.

How to buy the book

If you like what you've read so far, you can purchase Introduction to Excel VBA here.

Lulu is a website which prints books on demand, and ships them anywhere in the world.  If you're based in the UK and ordering more than 10 copies, you can also contact us directly about purchasing the book.

One final thing ...

To get the table above, I needed to go through all of the Word chapters stored on the Wise Owl network, getting the page number and chapter title for each.  I could have done this manually, but it would have taken ages and I'd have made lots of errors.  So instead I wrote a VBA program - and here it is:

Sub ListContents()

'to do with files and folders

Dim fso As New FileSystemObject

Dim fol As Folder

Dim ChapterFile As File

Dim doc As Document

'chapter and page numbering

Dim ChapterNumber As Integer

Dim PageCount As Integer

Dim PageNumber As Integer

'other variables used

Dim TableText As String

Dim ChapterName As String

'initially we have no chapters and no pages

TableText = ""

PageCount = 0

ChapterNumber = 0

'get location of files on Wise Owl drive (part omitted)

Set fol = fso.GetFolder("Q:\...")

'for each file

For Each ChapterFile In fol.Files

'check if it is a Word document

If Right(LCase(ChapterFile.Name), 5) = ".docx" Then

'get the chapter name

ChapterName = Left(ChapterName, InStr(1, ChapterName, ".") - 1)

'open the document and get page number at end

Set doc = Documents.Open(ChapterFile.Path)

Selection.EndKey Unit:=wdStory

PageNumber = Selection.Information(wdActiveEndPageNumber)

'close it back down again

doc.Close savechanges:=False

'add on this chapter number (some HTML omitted from string)

TableText = TableText & _

" HTML here " & ChapterNumber & " HTML here " & _

ChapterName & " HTML here " & PageNumber & _

" HTML here " & vbCrLf

'increase page count

PageCount = PageCount + PageNumber

End If

Next ChapterFile

'finished - show result in immediate window

Debug.Print TableText

End Sub

I've only included this to show what's possible.  The code above won't run on its own, and is not meant in any way to be part of a tutorial, but it does show one reason why VBA is useful to learn!

This page has 0 threads Add post