![]() ![]() In the Record Macro dialog box, you can assign a Keyboard Shortcut to your macro, but do not use any predefined key combination (like Ctrl+b) else it will be overwritten (ie. It will help to assign a name which is reflective of the action you wish to perform with the macro. that VBA uses as part of its programming language. A macro name cannot use keywords / reserved words such as If, And, Or, Loop, Do, Len, Close, Date, ElseIf, Else, Select. Spaces and most special characters are not allowed. A macro name must start with a letter as the first character while subsequent characters can be letters, numbers or an underscore (which is a good way of separating words). In the Record Macro dialog box, you can enter a name for the macro you wish to record (refer Image 2a, macro name entered is CellColor), else Excel will assign a default name like Macro1, Macro2, and so on. Using the Excel built-in macro recorder tool enables you to record a macro, assign a shortcut, add a description, store / view / edit & run the macro, as elaborated below. In Excel 2003, in the Tools drop-down menu click Macro and then click Record New Macro which will open the dialog box of Record Macro. You can also open the Record Macro dialog box by clicking on the icon appearing on the Status Bar (refer Image 1b) which appears at the bottom of the Microsoft Office Excel 2007 window. Another way to open the Record Macro dialog box is to click the Developer tab on the ribbon, and click Record Macro in the Code group. To start the macro recorder for recording a macro in Excel 2007, click View tab on the ribbon, click Macros in the Macros group, and then click Record Macro (refer Image 1a) which will open the dialog box of Record Macro (refer Image 2a). In the beginning when not very conversant with vba, you can record a macro while performing a specific task, and then going to the VBE you can view the required set of codes. A macro is the instructions given in the form of a set of codes to make the computer perform an action. Storing a Macro in Personal Macro WorkbookĪn easy way to learn VBA is to record your own macros with the Excel Macro Recorder tool, and then read, run and edit the code of the macro which you have recorded in Visual Basic Editor. ![]() ![]() Start Recording a Macro - the Record Macro dialog box Excel VBA - Record and Run Macros using the Excel Macro Recorder ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |