Excel Macros Series...13 - IT Skills

This blog is for IT lovers, accounts and finance executives who want to add value in their professional life.

test

Welcome to our blog. This blog is for IT lovers, Accounts/Finance Executives who wants to add value in their career path.

Search This Blog

Wednesday, 23 May 2018

Excel Macros Series...13

test

Understanding Codes in Macros

When you record a macro, Excel stores it as a VBA code. You can view this code in the VBA editor. You can understand the code and modify it if you have substantial knowledge of Excel VBA.
However, you can still view the macro code in Excel VBA editor and match it to the steps that you recorded in macro. You will learn how to view the code and understand it for the first macro that you created in this article – MyFirstMacro.

Viewing a Macro Code in VBA Editor



To view a macro code, do the following –

Open the workbook in which you stored the macro.

Click VIEW tab on the Ribbon.

Click Macros.

Select View Macros from the dropdown list.


The Macro dialog box appears.


Click MyFirstMacro in the macros list.

Click the Edit button.



The VBA editor opens and the code of the macro MyFirstMacro appears.


Understanding the Recorded Actions as Parts of Code



You can browse through the macro code and map them to your recorded steps.

Start reading the code.

Map the code to the recorded steps.



Scroll down the code to view more code. Alternatively, you can enlarge the code window.


Observe that the code is simple. If you learn Excel VBA, you can create the macros by writing the code in the VBA editor.

You will learn how to write a VBA code to create a macro in the article - Creating a Macro Using VBA Editor.



No comments:

Post a Comment

Popular

Welcome to our blog. If you want to; learn writing skills, preparation for CSS/Corporate laws, IT skills, downloading Business/IT books, and many more; this blog is for you.