What is the file extension for an Excel workbook containing a VBA program? a. .xltm b. .xlsm c. xlte d. .xlsb e. .xlsx ? Moving to the next question prevents changes to this answer.

The Correct Answer and Explanation is:

Correct Answer: b. .xlsm

Explanation:

When you create an Excel workbook that contains VBA (Visual Basic for Applications) macros, it must be saved in a format that supports those macros. The correct file extension for such a workbook is .xlsm.

The .xlsm extension stands for an Excel Macro-Enabled Workbook. Introduced with Microsoft Excel 2007 and used in all subsequent versions, this format is part of the Office Open XML (OOXML) standard. Unlike the regular .xlsx format, which does not support macros, .xlsm allows you to write, save, and run VBA scripts within your workbook. This is important when automating tasks, creating user forms, or implementing advanced calculations that require programming logic.

Here is a breakdown of the choices and what they represent:

  • a. .xltm: This is an Excel Macro-Enabled Template. It is used to create new workbooks based on a template that includes macros.
  • b. .xlsm: This is the correct answer. It indicates a macro-enabled workbook that allows the use of VBA code.
  • c. xlte: This is not a valid Excel file extension.
  • d. .xlsb: This stands for Excel Binary Workbook. It is optimized for performance and large data sets, but while it can support macros, it is not the standard extension used to identify macro-enabled files.
  • e. .xlsx: This is the standard Excel workbook extension, but it does not support macros. If you try to save a macro-enabled workbook as .xlsx, Excel will strip out all VBA code.

In conclusion, if your Excel workbook includes VBA code or macros, saving it as .xlsm ensures that all programming functionality is preserved and executable.

By admin

Leave a Reply

Your email address will not be published. Required fields are marked *