1.0 What is VBA?

Beginning VBA

Visual Basic for Applications (VBA) is the programming language created by Microsoft to control various parts of their applications.  Most things that you can do with the mouse and a keyboard you can also do using VBA.  In Excel you can create a chart, you can also create a chart using VBA, it is just another method of achieving the same thing.

Advantages of using VBA

Most VBA programs will do the same as what you could do with the keyboard and a mouse.  So why bother to use VBA?

Saves time:
The VBA code will operate at the speed your computer will allow, which will be significantly faster than you can operate.  For example, if you have to open 10 files, print the documents then close the file it might take you 2 minutes with a mouse a keyboard, but with VBA it could take seconds.

Reduces errors:
Do you ever click the wrong icons or type the wrong words?  Me too, but VBA doesn’t.  It will do the same task over and over again without making any errors.  Don’t get me wrong, you still have to program the VBA code, so if you tell it to do the wrong things then it will do the wrong things.  But if you can get it right, then it can remove the errors created by human interaction.

Completes repetitive actions without complaining:
Have you ever had to carry out the same action over and over again?  Maybe creating 100 charts, or printing 100 documents, or changing the heading on 100 spreadsheets.  This is not fun, nobody wants to do that.  But VBA is more than happy to do it for you.  It can do the same thing over and over again, in fact, that’s one of the things VBA does best.

Integration with other applications:
You can use VBA in Word, Access, Excel, Outlook and many other programs, including Windows itself.  But it doesn’t end there, you can use VBA in Excel to control Word and Powerpoint, without even needing the open Word or Powerpoint.

What is programming?

Programming is just the process of writing words in a way which a computer can understand.  However, you have to be very specific about what you want the computer to do.  That is the skill of programming, learning how to convey the message as clearly, as simply and as efficiently as possible.

What is the difference between a Macro and VBA?

This is a common question which can be confusing for beginners.  Put simply, VBA is the language used to write a Macro – just in the same way a book might be written using the English language.

The 1 golden rule of learning VBA

Once you get past the first few chapters you will have all the tools you need to use VBA code copied from the internet.  Whilst coping and pasting code is quite common practice it will not help you to learn VBA quickly.  Here is the one rule I am going to ask you to stick to . . . .

If you want to copy code that you do not understand you must type it out yourself – do not just copy and paste.

Why am I asking you to do this?  Because it will help you learn the VBA language much faster.

Let’s get started

Now you know what VBA is, why you should use it and the one golden rule there only one thing left to do . . .  let’s get started!

Next Part: 1.1 Enable the Developer Ribbon

Leave a Reply

Your email address will not be published. Required fields are marked *