Hello, guys, and welcome back to another class, of course, about the complete introduction to VBA
with Microsoft Excel.
So in this class, we are going to talk about basically what we talked about, the macros in the past
few quarters.
And in today's class, we're going to talk about what exactly is behind those macros.
So when we're talking about the macro, what exactly is a macro?
So basically, macro is a set of actions that we have recorded in order to reproduce it and to make
a project a little bit easier.
And basically, it looks pretty simple at first.
But when we go really well, when we try to understand what exactly is inside of a macro, it's a little
bit more complex.
And inside of a macro there is a set of code that is written down to be able to run it.
And it's not always simple.
Sometimes it's really complex to make really simple actions.
And basically all this is programmed in VBA into this class.
We are going to talk about all the interface of the interface that is around all this.
And we're going to take a look at the code, basically what it looks like.
We're going to see where the macros are exactly.
And basically talk about the VBA interface and where you will write down your code.
So pretty simple.
First thing that I suggest you do is simply go into developer stuff.
You can click on it and basically go into visual basics right here.
So it should look something like this.
So normally, if you have nothing right there, this simply means that you have no macros that are safe.
That's the only reason.
So if you have a macro, you should have something right there.
So you would have model one model to model three if you have a lot of well, depending of how much macros
you guys have.
And usually you should have your code right there.
So and then another thing basically.
Well, basically, when you want to add another module or create another macro, how exactly do you
do this?
It's pretty simple.
You just go in the insert right here and you click on Model because you want to create another macro
and then the module will appear in inside of this module.
We can simply write down something so we can write down, I don't know your code.
So here we'll have, for example, code example.
So then I can run it if this code was valid.
But in this case, it's just an example.
So we are not going to try to run it.
So this is for the first part.
Now, basically, you understand that the code is going here and all the modules are basically macros
that you guys have.
So basically all the macros that we have created in the past few classes are simply stored right there
inside of all the modules that we have.
So as you can see, all the macros are right there.
So if you look at the first one, we have Practice Micro, which is one of our macros.
We have practice micro too.
We have final practice.
We have all the macros that basically we have created.
It's possible to run our macros from here.
So basically we run our macro.
As you can see, it's automatically appearing right there, which is which, as you can see here, we
have one of our macros.
And in this case, it's the macro that we have created in, I think, the past few classes.
Well, in the past two classes.
And basically this is the final project that we had.
So basically, this is how you run your macro.
This is how you stuff your Maku.
If you guys have basic knowledge of Python and you worked with by term, normally you should understand
it.
Otherwise, this is how it works.
And don't worry, in the next few classes, we're going to talk a bit more in depth about it.
All right.
So basically, those are the basics of visual basics.
So just understand your code goes here and this is where you will program the macros, your modules
or your macros that we have you have created and all your sheets are stored right there.
All right.
Next thing that is pretty important to understand will be immediate window, which is right here and
in other programming languages.
Usually when you're working with Biram, you have a terminal.
And basically this is pretty much like a terminal, but it's a little bit different.
Basically, what you can do in this immediate window is testing outdraw.
So let's say you have run down a little micro, a little set of code, and it's possible to test it
inside of the immediate window, which is, in my opinion, pretty cool.
So you can test your McCRUDDEN, then integrate it to your code.
Another thing that you can do, we can, for example, ask questions to, I don't know, to excel.
An example of questions that you can ask is, let's say, for example, what is in a certain case,
what is the type of values that is in certain cases?
For example, if it's letters, if it's numbers, if it's safe, there is nothing you can basically
ask except those types of questions, which is once again pretty cool and can be useful in certain situations.
So how exactly do you generate this window?
Because some of you will not have it so pretty simple.
You simply go on view and you click on immediate window and basically automatically appear and you should
have it there right next and last thing that we are going to talk about today.
But it's really, really important.
Of course, it's the object browser, which is the list of all the libraries that we have into VBA.
So what exactly is the library so?
Well, when we're talking about the library, we can, for example, think of the math library inside
of Python.
We're all other or all other libraries that are present in Python.
Basically in Excel, it's pretty much the same thing.
So if you want to do complex applications or complex use of the bee, you need libraries to be able
to have access to certain calculations for certain functions.
Basically, this is exactly what it is.
And as you can see here, you have plenty of different things that you can do.
And it's all useful in that Web programming language, so for now, this those are really the basics
that you guys need to understand for a VRBA Well, before the introduction of the platform where we
are going to write down the code in the next few classes, we are going to write some lines of code.
So pretty simple.
If you want to save your project, that's going to be here.
If you want to come back, it's going to be here where you just click on controls that to run your code,
it's going to be there and well, you can import export your file.
So basically, as I said, those are really the basics.
I don't want to give too much information once again.
But for the moment, this is exactly what you need to start out the programming part.
So that's it for those guys and to open our next class.