If you have a set of similar objects they get put into a collection. For example Workbooks collection is a set of all the open workbook objects. Collections are just a group of objects so they do have their own properties and methods that you can use to manipulate one or more objects in the collection.
The objects or members of the collection are called elements and you are able to refer to an individual element by using the index number or it name. the index number is the number that excel will give it in the Switch Windows in the view tab. For an example of this you could close Sheet.xlsx using the following commands.
Workbooks (“Sheet.xlsx”) .Close or Workbooks(1) .Close
Take a note of how the object and the method are delimited by a full stop. If I did not specify an element (Sheet.xlsx or 1) then it would think I am talking about the hole collection.
Every object will have its own set of characteristics and they are known as its properties and they control the appearance and position of an object. For example the window object will have a WindowState property so that you can minimize and maximise the window.
When you refer to a property you use the syntax Object.Property. For example:
The Method is what you are going to do to the object so if we wanted to save the active workbook we would write:
Some of the methods you can use an argument with them. This lets you add in things like the file name. The syntax you would use would be Object.Method.argument1, argument2…. If you wanted to open a specific worksheet using this is how you would write it:
An event is something that has happened to an object, you opening a workbook in excel is an example of an event. Excel does have an open method that you can use but this method onli initiates the procedure, the actual process I an event. For an example of this you may write a procedure (which is called an event handler) that will display a message box each time a specific workbook is opened.
You could attend a Excel VBA course which will teach this and more in a lot more detail.