I Cannot Get VBA to Run in Excel

104 7

    Expose the Developer Tab

    • While VBA programmers sometimes run macros from the VBA programming environment linked to Excel, most users run macros from the "Developer" tab. If you don't see that tab, expose it with Excel's "Options" menu. Click the "File" menu's "Options" command, then click the "Customize ribbon" control from the "Categories" pane. Click the "Developer" checkbox to display the "Developer" tab, then click "OK" on all open dialog boxes.

    Change Security Settings

    • You won't be able to run any VBA programs if Excel's security settings don't allow it. Microsoft made it possible for users to lock out macros from execution because these programs can potentially perform malicious operations. Allow macros to run by first clicking the "Options" item from the "File" menu, then clicking the "Trust center link." Click "Trust center settings," followed by "Macro settings," and then click "Enable all." Close all open dialog boxes by clicking their "OK" buttons, then close and reopen Excel for your changes to take effect.

    Load a Workbook with Macros

    • Starting with Excel 2007, macros can only be stored in specific file types, those with the ".xlsm" and ".xltm" extensions. These are not the default formats for Excel; you must choose them explicitly. If you're looking for a macro in one of the default formats, ".xlsx" or ".xltx," you won't find it, as these formats can't store macros. Seek a macro to run in an ".xlsm" or ".xltm" file.

    Run a Macro

    • Once you've configured your security settings to allow macros and loaded a workbook with at least one macro, you're ready to run a macro with Excel's "Macros" command. Click that command's button from the "Developer" tab to tell Excel to display a list of macros in the current workbook. Double- click one of the macros from the list to run the macro.

Source...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.