Macro Security
Excel 2019 uses an authentication system called Microsoft Authenticode to digitally sign macro projects or add-ins created with Visual Basic for Applications. The macros you create locally on your computer are automatically authenticated so when you run them on your computer, Excel does not display a security alert.
For macros from an external source, the developer can acquire a certificate issued by a reputable authority or a trusted publisher. In such cases, Excel will run the macro if it can verify that it is from a trusted source.
If Excel cannot verify the digital signature of a macro from an external source, because it perhaps doesn't have one, a security alert is displayed in the message bar (below the Excel Ribbon). This alert gives you the option to enable the macro or to ignore it. You can click the Enable Content button to run the macro if you trust the source and you’re sure that the macro poses no security threat to your computer.
If you try to create a macro in an Excel workbook that was saved as an XLSX file, Excel will display a message on the message bar prompting you to save the workbook as a macro-enabled file first. When you get this message, click the Save As button on the message bar, and select the Excel Macro-Enabled Workbook (*.xlsm) file type from the filter list.
File type
File extension
Excel Workbook
xlsx
Excel Macro-Enabled Workbook
xlsm
If you choose to save the macro to the Personal Macro Workbook , it will be saved in the PERSONAL.XLSB file, which is an Excel Binary Workbook in the XLSTART folder. In this case, you’ll not need to save your workbook as a macro-enabled workbook.
When creating a macro for use on your computer, as much as possible, you want to store the macro in the Personal Macro Workbook. This means the macro will be global and will work in any workbook on your computer. It also means that you don't need to convert your workbooks to macro-enabled files. Only use a macro-enabled workbook if there is a specific reason to do so, for example, you want to distribute the file to other people.