Excel File Types - Excel VBA Programming Course: Lesson 4

preview_player
Показать описание
Excel VBA Programming Course – Lesson 4: Excel File Types

Hello everyone. Welcome back to the Excel VBA Programming Course. I’m your trainer Kazi and this is Excel 10 Tutorial.

In this lesson I want to talk about the different file types available in Excel. As it turns out the default Excel file extension XLSX does not actually support macro code so I'll need to save our workbooks in a specified file type in order to ensure that our code is preserved and it can run the next time we open the workbook.

Here goes the scenario demonstrated in the video.

I have an unsaved Excel workbook here. Let’s go ahead and get to the Save Prompt. I'm just going to press the keyboard shortcut CTRL+S. That'll bring us to the Save Prompt. At the bottom I can see the option that's listed here is Excel workbook with an extension named XLSX. That’s the standard default file type and macros are not allowed here.

If we write our macro code in here and then we save it. Excel will give us a warning that says hey you're trying to save macro coding here, I don't support it. If you for some reason ignore that warning which is highly likely because most of the times you just kind of save and click yes and don't actually read the prompt on the screen if we accidentally save code in a regular Excel workbook the next time we open it the code will be completely gone and all of our work will be lost.

So it's very important that we save our work in the proper format if we select the drop-down, we will find a file type Excel Macro enabled workbook with an extension of XLSM. What we really want to do is always save our workbooks, at least in this course, in this format.

The Excel Macro Enabled Workbook which is XLSM and you can always think of the M, at the end, as being short form of macro. These macro enabled workbooks are identical to the regular Excel workbooks. They look exactly the same. They have all the same functionality. The only difference is that they allow macros to be written and preserved. We're going to be sticking with this file format throughout the entire course.

So there is one thing we can do to simplify the process of choosing this option as the default save type.

Otherwise every single time you'll save a workbook it's going to be in the default Excel workbook and you might not properly save it in the right format. It's a little bit of a hassle to keep selecting the right choice. With that said if you're using Excel for other reasons outside this course you may not want to select this one as the default. So what I'm about to offer you is an optional setting.
Setting the default file type as XLSM.

You don't have to do this but it's going to make the course a little bit easier and make sure that you don't have to remember to do this every single time we save a file.

Now let’s go to the backstage window clicking on the file tab and then on the left side of the backstage window we have “Options” let's select it. This is going to open up “Excel options” pane. Then click on the “save” option. A dialogue box will open. Then you will find an option saying “Save files in this format”. This is the option where you will be able to select default excel file type. Then click on the dropdown and select Excel Macro Enabled Workbook which is .xlsm Now click ok and done.

Now to check it I just brought up the Save As window and we can see it says Excel macro enabled workbook. Done. From now on whenever I save a workbook, it will be in this format by default.
Now this is a global Excel setting but you can go ahead and change it back if you ever need to. Again if you're using Excel for other reasons and you don't want to accidentally save your workbooks as Macro enabled workbooks you might not want to choose this optional setting. But if you want to add a little bit of efficiency to your progressions about the course this might be worth taking some time to enable.

Thanks for watching See you in the next Video. If you have any questions leave a comment.

-------------------------------------------------------------------------------------------------------------
Support the channel with as low as $1
-------------------------------------------------------------------------------------------------------------

#excel10tutorial #filetype #VBA

Playlists:

Social media:
Рекомендации по теме