Wednesday, August 28, 2013

How to Hide Macros in an Excel Workbook


1. Open Microsoft Excel and navigate to the 'Menus' tab at the top, left corner of the screen. Click the 'Files' drop-down menu and select 'Open.' Double-click the name of the Excel workbook that has the macro you want to hide.
2. Navigate to the 'Developer' tab, which is located at the top, right corner of the window. Click the 'Macros' button, which is positioned at the left side of the navigation ribbon and to the right of the 'Visual Basic' button.
3. Scroll through the list of macros and locate the name of the macro you want to hide. Click 'Cancel' to close the window and click the 'Visual Basic' button to open the VBA editor window.
4. Click the 'Modules' link at the left side of the window to bring up a list of VBA modules saved on the workbook. Scroll through the code until you find the opening 'Sub' command at the top of the Macro. For instance, if the Macro is titled 'Macro1,' the line of code should read 'Sub Macro1().'
5. Click behind the opening 'Sub' command and type the word 'Private.' Add a space between the 'Private' and 'Sub' commands so your line of code reads 'Private Sub Macro1().'
6. Click 'File' and choose 'Save' to save the changes and hide your macro.

Blogger news