In this video we're going to walk through how to set up your Excel file to allow the use of Visual Basic
or VBA so you can building custom features and functionality that you wouldn't be able to access otherwise.
So the first thing we need to do is activate the developer tab and you can see up here in the top of
my screen and my ribbon.
I don't have a developer tab currently shown you can only see the general basic tabs that Excel starts
you off with the developer tab is what houses all of the VBA functionality and its interface within
Excel.
So we're definitely going to need to activate that in order to do so.
We're going to go to file and then go down to options and depending on which version of Excel you're
using your options might be placed a little bit differently on your screen but it should take you to
the same place which is this options window that pops up and you can control a lot of the different
ways Excel behaves in this window.
But for now we're primarily interested in the customized ribbon option that you see here.
So go ahead and click on that and this feature allows you to customize the interface you see at the
top of Excel or in this ribbon that's up here.
It allows you to add buttons or functions that you use a lot or add new tabs entirely.
And so for us we want to add the developer tab.
So under this choose commands from dropdown go ahead and select all tabs you can see this list on the
left contains all of the tabs Excel is capable of showing you and the list on the right contains what
Excel considers to be the main tabs.
So right now we can see that this box next to developer is unchecked which means it's not currently
being shown.
We're gonna want to go ahead and check that box to make sure that our developer tab will show up in
our ribbon in case you don't see the developer tab in your main list.
You can take any of these tabs that appear in the all tabs list on the left and click them to add them
to your main tab window.
Now when I click OK to close this we can now see I have my developer tab up at the top with all my other
tabs that I can toggle between and this is the primary interface that we're going to use for interfacing
with Visual Basic in our excel file to really make sure we have everything we need access to to build
our custom features.
The last thing you need to know about making your Excel file capable of using VBA code and using macros
is that you need to save the file as a special macro enabled excel file instead of your general excel
file macro enabled files aren't shareable but they do allow you to run code which is the macros in your
workbook.
So we're going to go up to file and then down as and depending on which version of Excel you're using
this screen might look a little bit different but the same general idea we're going to either click
on this P.C. or browse or wherever you want to save the file too and then go ahead and navigate to your
file location.
Now we can see right here under Save As type.
Right now it defaults to Excel workbook which is your general excel file so we can go ahead and save
this once and we'll just call it regular.
And this way we'll be able to see the difference between the two files that we're gonna do that again
file save as browse.
Now this one I will call macros and instead of saving it as a general Excel workbook I'm going to save
this as an Excel macro enabled workbook which is this option right here and then click on that and click
save.
Now if I open this file location we can see that these icons and the file types over here are actually
going to be a little bit different.
And so we can see this is your regular file.
It's got the regular Excel icon as its icon and it's just called a Microsoft Excel worksheet which again
is just a general excel file with your regular data.
Nothing special in it.
This macros file you can see the icon is a little bit different it has this green scroll in the corner
of it.
And that means that this file actually has some embedded code it has are macros and things that might
be built into it and it's not a shareable file.
So any user who comes and looks at these two files can immediately tell this is a regular file it has
the regular icon as you say regular Microsoft Excel worksheet whereas this file is the macros file it
has the scroll in the corner and it says it is a macro enabled worksheet.
And so a user will instantly know whether or not it's a general excel file or if it's something that
they should be looking for buttons or code or things like that that might enhance the usability of the
file.
So in this video we talked about how to set up Excel to be capable of using macros how to build in the
developer tab and ways for you to access the VBA that lives behind the file and all of all of the general
setup work that would go into enabling your file to receive VBA code and macro code.