This is Part Three of VBATutor. You should work through Part One and Part Two first.

The coding in Part Three uses more advanced programming techniques as discussed in 'Lesson 16' in Part Two. In Parts One and Two I tried to keep the code simple by using one function per line, such as in this example below.

StrLength = Len(SName)

'find the length of the string

SName = Left(SName, StrLength - 2)

'delete the last 2 characters from the string

Sname = Lcase(Sname)

'convert the string to lowercase


In Part Three much greater use is made of multiple functions within one line of code.
For example, the above code could be rewritten as ...

SName = LCase(Left(SName, (Len(SName) - 2)))


This is what is referred to as 'elegant' programming. It is very code efficient, but it is more difficult for the beginner programer to learn, so it is only being introduced here in Part Three.

Part Three extends upon the use of data in tables that we started to look at in Part Two. We will first look at some advanced data manipulation [searching, sorting and filtering]. We will then continue on to some more advanced topics such as writing data to text files, using DDE and OLE to allow communication between Office programs and producing advanced UserForms. Finally there are some links to some excellent resources to help you become a MS OFFICE POWER USER.

Once again, Good luck!


VBA Tutor These lesson refer to examples that can be downloaded from here!