Using Code to Make Applications Do Things
You might think that writing code is mysterious or difficult, but the basic principles use every-day reasoning and are quite accessible. The Office 2010 applications are created in such a way that they expose things called objects that can receive instructions. You interact with applications by sending instructions to various objects in the application. These objects are many, varied, and flexible, but they have their limits. They can only do what they are designed to do, and they will only do what you instruct them to do. Below are some of the important concepts that you must learn to start writing VBA Codes:
Objects
Programming objects relate to each other systematically in a hierarchy called the object model of the application. The object model roughly mirrors what you see in the user interface; for example, the Excel object model contains the Application, Workbook, Sheet, and Chart objects, among many others. The object model is a conceptual map of the application and its capabilities.
Properties and Methods
You can manipulate objects by setting their Properties and calling their Methods. Setting a property changes some quality of the object. Calling a method causes the object to perform some action. For example, the Workbook object has a Close method that closes the workbook, and an ActiveSheet property that represents the sheet that is currently active in the workbook.
Collections
Many objects come in both singular and plural versions—Workbook and Workbooks, Worksheet and Worksheets, and so on. The plural versions are called collections. Collection objects are used to perform an action on multiple items in the collection. Later on, this article discusses how to use the Worksheets collection to change the name of each worksheet in a workbook.
Source: http://msdn.microsoft.com/