Enable macros on a specific worksheet in excel 2016 for mac

broken image

Since you are using Excel 2007, this is what you need to do:ģ) On the left pane window, double-click the sheet where you need your code to run.Ĥ) Now, at the top of the code window you will see ( General with a drop down, and ( Declarations) with a drop down.ĥ) Click the drop down by (General) and select Worksheet.Ħ) Now in the code window you will see Private Sub Worksheet_SelectionChange(ByVal Target As Range). So, whatever your original code is to run your Macro, we recommend you to put it back into its original form. In this case, you can keep your Macro in module one and you must use the worksheet change event in the worksheet itself, not a module.

broken image

Let's study this a little bit further.įor example, when you have a Macro that runs when the user clicks on a button, but instead you want the Macro to run when Cell D10 is populated.

broken image

If a user wishes to run a Macro in Microsoft Excel 2007 when the D10 cell is found to be populated, worksheet change event must be used in the Excel Worksheet, not in the module.