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).
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.
Where you see all the open workbooks, where you add modules and userforms
The properties of the workbooks, the names of the modules and the properties of all the components of the userforms.
Where you write and test all your code
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.
Split your screen, use the F8* key and see what you procedure does in Excel step by step. Back up, correct and re-test.
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.
The macro recorder is a great helper and teacher but it sometimes makes it complicated. Here is a recorded macro simplified.
Protect you code, your sheets and your computer.
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.