Updated June 12, 2023
PART- 7 – Visual Basic Editor (VBE) – Local Window
Transcript for Video – Visual Basic Editor (VBE) – Local Window
Video on Visual Basic Editor (VBE) – Local Window – Now let us look at what this step into step over and step out is all about say for example if you are using step into what happens is when you click here this does nothing but execute your code line by line so as you can see the movement I am pressing step into it execute the code line by line and you know as you can see on left hand side this values gets updated automatically so you can step into and execute the code line by line see this is very important because when you are kind of texting for error or trying to understand weather your code running properly and you know you must use step into I pretty much use step into every now weather my code running properly or not likewise you know once we have step into the subroutine the other option gets activated so this is step over and step out, step over may have every limited use here because we step over specially use when you are probably using some loops say for example certain condition with if and you want to get out of that do so in that case we could actually use step over if you don’t have of any kind of loops like that this step over essentially function like the step into so it is actually behaving like step into in this contest so pretty much limited here for the time being but please remember that this can use to come out of the do likewise step out, step out is nothing but you know you want to come out of the code so you just click here you will be directed to the end of the course so you want to come out this is essentially similar to what we had for reset if you click reset you actually come out of the environment and you come back to zero where you want to stat subroutine again step over again function like similar one so these are functionalities about step into step over and step out these functions are probably you know very important but they are probably useless if you are not using this thinks which are called as local windows or immediate windows or may be watch window I’ll probably you know explain this with the contest of what we are discussing here, now the movement you are stepping into something see you may want to kind of track what is the update here so for me to track this I am actually looking at the left hand side now probably your update is connected logically through various variables across multiple sheets so it would be kind of very difficult for you toggle from A sheet to B sheet, B sheet to C sheet if there inter connected and if there are lot of variables which are getting updated simultaneously when there are code running in your environment you may want all those variables which you want to track here itself within the VB editor so that why you may have a local window so say for example I’ll click here I’ll just you know come out of this and start fresh and click on local window and movement I do that you can see that the local window actually pops up now what does this mean let us see if start this step into function the movement I click on step into this basically gives me name of 2 variables X and Y which have been defined and this tells this are integers and the currently there value is zero so let me step into that as per the code and now the X is define as cell 1,1. Value see the left-hand side X is basically 17,000, so here can you see that X is now 17,000, so this gets activated, and it’s now displayed as worksheet for us to debug. Let me again step into now in this code. It gets updated from 17,000 to 18,000, and let me come out of it. What about Y? Y is 34 as off now, and you can kind of play with this and see how they are moving as when you actually execute the command, so when you step into, you would also require these local windows, so that’s why these are very helpful and if I do it again you can see that you can see the code running and simultaneously it values are changing so pretty useful.