Page 229 - CITS - Computer Software Application -TT
P. 229

COMPUTER SOFTWARE APPLICATION - CITS




           How to change macro settings
           Microsoft Excel determines whether to allow or disallow VBA codes to be executed in your workbooks based on
           the macro setting selected in the Trust Center.
           Here are the steps to access the Excel macro settings and change them if needed:
           1  Go to the File tab and select Options.
           2  On the left-side pane, select Trust Center, and then click Trust Center Settings.
           3  In the Trust Center dialog box, click Macro Settings on the left, select the desired option, and click OK.

           In the screenshot below, the default macro setting is selected.






























           How to view, edit and debug VBA codes in Excel
           Any changes to the code of a macro, whether it's generated automatically by the Excel macro recorder or written
           by you, are made in the Visual Basic Editor.
           To open the VB Editor, either press Alt + F11 or click the Visual Basic button on the Developer tab.

















           To view and edit the code of a specific macro, in the Project Explorer on the left, double-click the module that
           contains it, or right-click the module and pick View Code. This opens the Code window where you can edit the
           code.
           To test and debug a macro, use the F8 key. This will take you through the macro code line-by-line letting you see
           the effect that each line has on your worksheet. The line currently being executed is highlighted in yellow. To exit
           debug mode, click the Reset button on the toolbar (blue square).








                                                           216

                             CITS : IT&ITES - Computer  Software Application - Lesson 63 - 77
   224   225   226   227   228   229   230   231   232   233   234