All about Macros in Excel | Macro settings explained | Security Issues with them.

What are macros in Microsoft Excel?

Ever thought to automate things you do in excel? Suppose you are manager of a bank and you are repeating some of the actions on a daily basis. A macro is an action set or a series of actions that you can run as many times as you want. When you create a macro, you are recording your actions i.e. mouse clicks and keystrokes and after the creation of a macro, you can use it as many times you want.

Before you start to use a macro you must know how to record a macro. For recording a macro you must know where to find the developer tab in Microsoft Excel.
Before you create a macro in Excel Macro tools can be found in Excel in Developers Tab To Show the developer tab follow these steps : –
Just Open Excel application for 2010 + versions

  1. Click the File tab.
  2. Click Options.
  3. Click Customize Ribbon.
  4. Under Customize the Ribbon and under Main Tabs, select the Developer check box.

View Developers Tab in Excel
For 2007 and earlier versions

  1. Click the Microsoft Office Button Office button, and then click Excel Options, PowerPoint Options, or Word Options.
  2. Click Popular, and then select the Show Developer tab in the Ribbon check box.

How to Record a Macro in Microsoft Excel?

Step 1: Just head into the Developer’s Tab

developer option
Step 2: Click On the Record Macro under the Developer Tab.

Start macro recoding
Step 3: You will get a dialog box popup of record Macro. Enter a name suitable for the macro in the Macro name box, enter a shortcut key in the Shortcut key box, and a description in the Description box, and then click OK to start recording.

Record Macro
Step 4: Now perform the actions you want to automate. Then Click on the Stop Recording button. Your macro is now defined well if you want to experiment with your macro and are familiar to Microsoft Visual Basic then follow these steps:

Developer Tab ->Macros-> Edit

Stop Macro recording

Run a Macro in Microsoft Excel

Your macro is now created and assigned to a shortcut key if you want to run the macro simply head into the developer’s tab click on macro and select the run option or simply press the shortcut key assigned to it.

Run Macro.PNG

Security Issues with Macros | Explained

Most of the macros are defined in the Excel VBA- Visual Basic for Applications and where lies a an executable there is a security loophole. You can easily trust

What are Macro Viruses?

A macro virus is a set of one of more macros which set is capable of replicating itself recursively. The set of macros is capable only of copying itself elsewhere once, then it is
not considered to be a virus.

Macros are written has access to most Windows system calls and executes automatically when workbooks are opened since they are pieces of code and there is a potential threat of the existence of a virus written as a macro and is hidden within Excel that are executed on opening a workbook.

Excel workbooks with macros are saved with .xlsm file extension but yeah extentions with.xlsx do not hold any macros within therby are safe. They are termed as Macro Enabled Excel Workbooks. Before you open such workbooks, you should make sure that the macros they contain are not malicious.

A macro virus can be spread through e-mail attachments, removable media, networks and the Internet, and is notoriously difficult to detect. A common way for a macro virus to infect a computer is by replacing normal macros with a virus. The macro virus replaces regular commands with the same name and runs when the command is selected. These malicious macros may start automatically when a document is opened or closed, without the user’s knowledge.

Macro security settings in Trust Center

Step 1: Just head into the File Tab
Step 2: Select Options
Step 3: The excel options dialog box appears. Select the Trust Center in the left pane.

Trust center dialog Box

Here you can choose the permission level for macros such as

  • Disable all macros without notification-If you choose this option all alerts (notifications) about macros are disabled.
  • Disable all macros with notification − Macros are disabled, but security alerts appear if there are macros present. Macros can be enabled on case-by-case basis.
  • Disable all macros except digitally signed macros − Macros are disabled but security alerts appear if there are macros present. However, if the macro is digitally signed by a trusted publisher, the macro runs if you trust the publisher. If you have do not trust the publisher, you will be notified to enable the signed macro and trust the publisher.
  • Enable all macros (not recommended, susceptible to macro viruses) − If this option is chosen, all macros run. This setting makes your computer vulnerable to potentially malicious code.

Macro settings

Advertisements