Now that you've had some introductory experience making some simple subs in VBA and you've been exposed to creating user defined functions. I wanted to delve deeper into the object hierarchy structure in VBA. We're going to talk about properties and methods and events in this screen cast. So just kind of want to show you an example of object hierarchy in VBA. It starts with the application which is Excel and Excel has a bunch of objects associated with it. For example you can have an Addin like the solver Addin or the data analysis tool pack or maybe you can make your own Addin. There's also Windows that pop up, Workbooks, WorksheetFunctions. So, each of these objects has sub-objects, for example, inside of a workbook you might have charts. The workbook has a name, you can have visual basic projects. Those are like the, when you bring up the editor you're working in a project that's associated with the workbook. The workbook can have windows, the workbook obviously has worksheets. And if we zoom in on the worksheet object, it's got sub-objects, so it's got a comment. There are hyperlinks, you can have names to a worksheet obviously, it has to be named. The page setup and one of the most common is the range object, so we're going to talk a lot about the range object. You can also have object collections like workbooks, instead of just workbook you can have with an s there that corresponds to all currently open workbook objects. You can have charts, you can have a collection of all the worksheets. So for example, to referring to a worksheet called Main, that's how you would refer to the main worksheet. Maybe you have a chart that's named XY, that's how you can refer to that of the collection charts. The complete object references, really include everything from the application down to the specific thing that you are referring to. So for example, application.Workbooks the excel application. You're talking about Project6 in the workbooks of Project6 you're referring to the main worksheet and then range B16 on the main worksheet. A lot of times the application can be dropped, if you've only got one project open, you can drop the workbook name and you can just use worksheets.main. If you only have one worksheet you're working with you can drop that and just referred to range. But if maybe your workbook has multiple worksheets and if that's the case, you need to make sure that you're properly activating the different worksheets as you go back and forward between them. So in that case, you use worksheet.range to refer to those. So let's talk about properties, methods, and events, properties are attributes of objects. Methods are actions to be taken on objects, and events are happenings that objects respond to. So just some simple examples and in a subsequent screen cast I'm going to show you some more examples of these. An example of a property would be range A1, so that is cell A1 width. So that is the width of cell A1, a method, it is an action that is taken on an object, so range B2.Clear is clearing everything in range B2. An event for example, when a workbook is opened, maybe when a worksheet is activated or a workbook is closed. So those are events, so there's lots of these, there's literally thousands of these and I wanted to kind of show you how you can find more information about these. If you're more interested you can go into the editor, and let me start with this closed because this is sort of the initial view that you might have. You go up here to this object browser or you can click F2. This sort brings up all the difference associations between the different objects, and properties, methods and so on. So for example, let's look at range, so range is one of the most common ones. So you can click on range here, and then this tells you all of the different things that apply to range. For example there's an activate here and you have this little symbol here that denotes that it's a method. You can also have a range address, so that's a property, so this icon is for properties. You can clear, that's a method, you can Copy, that's a method, some other things, if you had a cell maybe like the interior is another property. You can have a ColorIndex, you can create a Pattern and so on. So, this is how you can get more information on all of the different associations between the objects, properties, methods, and events. Let's take a closer look at the range object properties, the range object can have a value. Obviously that's what's stored in the cell, it can have text and over here, you see if you can read/write it or just read only. Value of the one shown here is the only thing you can change, you can also change things like the color and I'll show you how we can do that. Count, you can count the number of cells in a range, if the range is a single cell, you can get the column index and the row index. You can also get the address of a particular range, and there's others. So for example, if I've got some data over here, and I just do MsgBox Range A1, just as kind of a little test when I run this, it's going to spit out 4. By the way, if you leave off a dot something on range, the default property is value. So you could if you want to, just type in value or you can just leave it off, because value is the most common, by far, of all the properties of range. If you wanted to, maybe look at the colors, so maybe we go over here and we make this orange and I wanted to I can type in interior.colorindex. And we're going to message box that when I run this, so orange has a ColorIndex of 44. ColorIndex is something that you can write too, I can swap this around to write to that property. So the ColorIndex, I could say it's equal to 50, and when I run this, it's going to change that to a green which corresponds to the ColorIndex of 50. And in subsequent screencast and through just different examples in this course you're going to get experience using a lot of the other properties. Select so you can select the cells and a range of cells, you can copy and paste so if you did range c1.copy, this second position here is where you're going to paste it. You can also erase using dot clear and you can delete, so you can delete and that shifts other cells into place. Let me just show you a couple examples here, this first one, selection.clear, is a method on our selection. So this is our selection, when I run this using F5, it's going to clear the selection so that's a method. And maybe for this second one, this is also a method, we're going to copy so we have range A1:A4.Copy. Then this second position here is where we're going to paste it. So I don't need to start with the selection because the object is the range, and when I run this, it's just going to copy that and paste it over there. So this is sort of just a introduction to objects, properties, methods and events, we'll talk more about this in the next screen cast.