In this video we're going to discuss the workbook sheet calculate event. So the workbook sheet calculate event gets triggered whenever a calculation happens in any sheet on your workbook Okay, any sheet that would have calculations happen on it will trigger this event. However, if you for example, change the value of a cell, but that does not trigger any calculations, this event will not be triggered. Okay. So for example, if you enter your name in a cell, and this does not require any calculations to happen, so there are no other cells that are reading your name from from that cell that you entered your name on, and no calculations are required, then, actually, this event will not be triggered. This event also has a parameter called sh here as an object is a sheet object and it actually refers to the sheet That the calculations happened on.
So let's have an example. For example, I'm just going to write a message box here that says calculations happen in. I'm going to put a space here, and then I'm going to close the double quotes. I'm going to have an ampersand and concatenate on sh dot name. So actually is going to say calculations happened in sheet, whatever the name of the sheet is that the calculations happen on. So actually, let's try for example here and this cheat sheet 28.
I'm just going to try writing my name here. Okay, and this is not triggered the event because no calculations were needed. When I entered my name, even if I enter the number five here, there are no other cells reading from that cell, so no calculations are needed. And this is why the event has not been triggered if I enter equals one plus one. This will trigger a calculation it says calculations happen in ci 28 Okay, so sh actually refers to the sheet that the calculation hoppin on, if you even write equals two, okay? This for a solid is a formula.
And for that Excel will need to do calculations. So this is going to trigger the event. Okay? So actually, as you can see here, this triggered the event, if you enter your name and there is another formula, for example, reading the cell or reading from the cell that you entered your name on, this triggered a calculation. So this actually will make the event got triggered. So that's it, guys for the workbook sheet, calculate event.
I typically don't use it a lot, because this event can actually slow down your workbook because it's going to run a lot if you use it, because pretty much any change that you do anything that you select will trigger some calculations so this would run a lot and would slow down your workbook. So you need to be using it very cautiously. Okay, you need to be careful if you're going to use it and make sure if you're going to use it is the last resort and that you've researched all the other options and that you absolutely need to use it. So thanks guys for watching this video and I'll see you on the next one.