Recording Macros Recording a macro in excel is very easy process: you click on Tools, Macros, and Record New Macro to display the Recording Macro Dialog box. Type the name of the macro you want to record in the Macro name box, and click OK. Perform the action you want be included in the macro, then click on the stop recording button on the tool bar, now your macro is ready for use. You can view your code by clicking Tools, Macro, Macros select macro name, Edit. Visual Basic will open with the code.
Running Macro After successful recording a macro you can run it by clicking Tools, Macro, Macros select the macro name, Run. The dialog box will display all available macros in the workbook. If you want to run a macro every time when workbook open name the macro Auto_Open. There are several other ways to run a macro like pressing a key sequence, by clicking a toolbar button and creating a new menu.
Running a Macro on key sequence ? Click Tools, Macro, Macros. ? In the Macro name box, select the name of the macro to which you want to assign to a keyboard shortcut key. ? Click Options.
? Type a letter in the Shortcut key box. Typing a lowercase letter lets you use Ctrl+letter, while typing an uppercase letter lets you use Ctrl+Shift+letter as the shortcut. ? Type a description for your macro in the Description box. ? Click OK.
? Click Cancel. Creating Toolbar Button ? Click Tools, Customize. Then, if necessary, click the Toolbars tab to display the ? Toolbars tab page of the Customize dialog box. ? Click New. Then, in the Toolbar Name box, type the name of the new toolbar and then click OK to create the toolbar. ? In the Customize dialog box, click the Commands tab.
? In the Categories list, click Macros. ? Drag the Custom Button command to your new toolbar. ? On the new toolbar, right-click the button you just added, click Name, type a name for the button, and press Enter.
? On the Custom Macros toolbar, right-click the new button and click Assign Macro. ? Select the macro you want to assign to the toolbar button and click OK. ? In the Customize dialog box, click Close. Creating New Menu ? Click Tools, Customize.
If necessary, click the Commands tab. ? In the Categories list, click New Menu and drag the new menu to the right end of the main menu bar. ? Right-click the new menu, and click Name. Type your new menu name, and press Enter. ? In the Categories pane of the Customize dialog box, click Macros.
? In the Command list, drag the Custom Menu Item command to the head of your new menu. When a box appears under the new menu head, drag Custom Menu Item onto it. ? On the new menu, right-click Custom Menu Item and then click Name.
? Type a new name for the menu, and press Enter. ? On the new menu, right-click the menu item you just renamed and click assign Macro. Then, in the Assign Macro dialog box, click the name of the macro you want to assign to the menu item and click OK.
? Click Close. Macro Security In you daily routine you have to deal with virus and other harmful software. When you work with VBA you should install at least on Antivirus software on your computer. There are three type of security settings available in Microsoft excel: High, Medium and Low. You can select any one of them by clicking Tools, Macro and Security.
? You should never choose Low level in the security setting. ? Next level is Medium which means every time when you open a macro workbook excels will ask you if you want to run macros or not. ? High level of security setting will disable all macros in the workbook. Smart Idea If you have a workbook containing a macro the runs very time when you open that workbook Press Shift Key while opening the workbook, Auto_Open Macro will be disabled.
Excel VBA Tutorial
We Provide Professional Training For Microsoft Excel and VBA With Video Example.
World Web Directory
We are the fastest growing human edited web directory in the world. Listing of new website in 48 hours on static html pages with static text links.We are the only directory providing life time directory listing on static html pages.