The first step to enhancing excel and adding more functionality is to understand Visual Basic Visual
Basic four applications or VBA.
Is the programming language found in Microsoft products that allows you to add more functionality than
the software is inherently capable of VBA is commonly used in programs like Excel and Access that are
data heavy so we can speed up the data entry or data manipulation.
Data analysis processes.
So it's a good tool to have when developing a database file so that you can build features that are
unique to your specific needs and ensure that you have the functionality required to use your file efficiently.
In a previous video we showed how to set up the developer tab to appear in your ribbon.
So we're gonna go ahead and click on that so we can see the VBA developer interface the primary things
we are interested in are the code and control sections of the ribbon the code section has the Visual
Basic button which opens the VBA window for you to write code in.
It also has the macros button which lets you directly run pre written macros and the record macro button
to record your actions as you perform them to turn them into a macro for future use.
The controls section is how you will build the user interface into your Excel file for your users to
interact with the VBA indirectly rather than having to access your code.
And this is discussed in a future video for now.
Go ahead and open up the Visual Basic window by clicking on the Visual Basic button in the code section
and that should look something like this.
You can see over on the left hand side of the screen There's the project Explorer which is this window
here.
This will list all of your user forms and macros that you have in this particular file.
So ours is empty right now because we don't have anything in it.
But this is the window that you'll usually use to navigate your VBA code that lives in your file.
This lower window here is the properties window which will display the properties associated with whatever
you have selected in the product explore the properties window is really useful and excels version of
VBA since it doesn't have an internal properties function for things like user forms but it isn't as
useful in programs like access.
So we'll be using this window a lot in Excel but not necessarily in other Microsoft programs.
Now we can look at the top of the screen here through some of these tools.
Obviously this is the save button which I recommend you use often.
And if we jump over here we have the undo and redo buttons which you can just use the controls each
shortcut like you do in most other Microsoft applications.
These buttons here the play pause and stop buttons are gonna be very useful when we talk about air proofing
in a later video.
These next two buttons just toggle between your project explorer and properties windows.
If you happen to close out of one of these you can always bring it back by clicking on its corresponding
button.
And this third button here is really useful if you get stuck at any point during your code.
This is the object browser which will show you all of the terms and functions you can call from the
VBA.
We'll talk more about this later.
But keep in mind keep it in mind in case you get stuck trying to figure out VBA terminology.
Next let's look at this debug dropdown.
The debug dropdown has a lot of useful tools in it for trying to find the errors in your code and correct
them and will actually cover all of this in a later video.
Next let's look at the insert dropdown.
Here's where we can insert a user form a module or a class module.
These are the items that will how's your code in VBA in your Excel file.
Let's go ahead and insert a user form and a module we can see the user form and the module have both
showed up in our project Explorer window so this will help us track what we've inserted into the file
and toggle between the two.
Generally speaking user forms are what you build for the user to enter data or interact with that data
indirectly.
These forms have code that are tied directly to them and we'll talk more about that later.
Modules are where you put any code that isn't necessarily tied to a form but you still want to use somewhere
in your file.
So in this video we talked about the VBA interface and some of the key buttons and items we will be
using.
So now we are ready to start coding in VBA.