Tutorial on Excel Macros (VBA)      

Excel VBA Consulting

VBA Excel help

Excel functions and formulas

 

VBA for Excel Tutorial

 

VBA for Excel Sitemap

 

VBA for Excel Solutions

 

 

Introduction to VBA for Excel

 

History of VBA for Excel

 

 

 

 

 

 

 

The VBA for Excel Programming Environment

The programming environment in VBA for Excel is one of the most friendly and forgiving.

Its two main components are the Visual Basic Editor and the Macro Recorder. The latter will be your teacher (and a very good one) for the first few weeks . It will then become your permanent assistant writing long sentences of code without complaining and without typos.

In this section we will also learn about  the security aspects in the VBA for Excel and the events (what triggers the VBA procedures).

Visual Basic Editor (VBE) in Excel

The most user friendly programming environment. You will create your procedures (macros) and userforms in the VBE. You will modify and test these components and even make changes while you are testing your procedures step by step.

The Project  Window in the Visual Basic Editor of Excel

Where you see all the open workbooks, where you add modules and userforms

The Properties  Window in the Visual Basic Editor of Excel

The properties of the workbooks, the names of the modules and the properties of all the components of the userforms.

The Code  Window in the Visual Basic Editor of Excel

Where you write and test all your code

Developing Macros in the VBE

You are becoming so good that you don't need the macro recorder sometimes. Here is how you create a new VBA procedure from scratch.

Testing  Macros in the VBE

Split your screen, use the F8* key and see what you procedure does in Excel step by step. Back up, correct and re-test.

Excel Macro Recorder

You can use the recorder to develop macros rapidly. If you want to do more the Macro Recorder is the best teacher and will be a great assistant even when you become an expert at programming in VBA. It WRITES the code for you. In this chapter you will learn about and try the Macro Recorder. You will run the macro that you have recorded.

Modifying Macros in the VBE

The macro recorder is a great helper and teacher but it sometimes makes it complicated. Here is a recorded macro simplified.

VBA Security and Protection

Protect you code, your sheets and your computer.

VBA Events

For a procedure to start it must be triggered, you click on a button, you close a workbook, the value of a cell changes. Find the right event.

 
 

Excel VBA Consulting

Excel macros help

Exxcel functions and formulas