In such cases, the macros are only enabled for a single time. For examples, files opened from an unsafe location such as the Temp Folder, or if the system administrator has set the security policy in your organization to disable all macros without notification. However, some Excel files cannot be made trusted documents. What you should know about trusted documents in ExcelĮnabling macros through either a message bar or Backstage view makes the file a trusted document.
The next time you open the workbook, the security warning won't appear. This will turn on the macros and make the file a trusted document. If you trust the source of the file and know that all the macros are secure, click the Enable Content or Enable Macros button. If the Visual Basic Editor is open at the time you are opening the file with macros, the Microsoft Excel Security Notice will be displayed: With the default macro settings, when you first open a workbook containing macros, the yellow security warning bar appears at the top of the sheet right under the ribbon: There are two ways to turn on macros for a certain file: directly from the workbook and through the Backstage view.
#Excel macro button not working how to#
How to enable macros for individual workbooks How to avoid these dangers? Just follow one simple rule: enable only safe macros – ones that you've written or recorded yourself, macros from trusted sources, and VBA codes that you have reviewed and fully understand. For this reason, Excel's default setting is to disable all macros with notification. A malicious macro that you run unwittingly may damage or completely delete files on your hard drive, mess up your data, and even corrupt your Microsoft Office installation. Though VBA codes are very effective in automating complex and repetitious tasks, they are a significant source of risk from the security point of view. Enabling macros programmatically with VBAīefore you go enable macros in your worksheets, it's important to understand how dangerous they can possibly be.
Like almost any technology, macros can be used for both good and evil. The article looks at how to turn on macros in Excel, explains the basics of macro security and shows how to adjust the security settings to run VBA codes safely.