Copy The Macro. (If you copied the macro from internet or other source you can skip this section)
Go to Developer tab in the workbook which you have macro to be copied. (If you can't see developer tab, check this post 'Display Developer Tab'.) There You can see "Code" subgroup and "Visual Basic" as the first option. Click on it to open the VBA editor.
Right side of this window you can see the list of excel workbooks open at the time and list of sheets, List of forms in a workbook & list of modules in a workbook. Find the module which is going to copy and double click on it. Now you can see the code. Select and copy all lines of the code. (Hope this module is not linked with any other module in the workbook. If you have any doubt about it, please get support from experts. Otherwise copied macro will not work properly.)
Paste the Macro
Go to Developer tab in the workbook which you have macro to be copied. (If you can't see developer tab, check this post 'Display Developer Tab') There You can see "Code" subgroup and "Visual Basic" as the first option. Click on it to open the VBA editor.
Click on insert button on the VBA editor and select 'Module'. Paste the code copied by you. Save the workbook with the macro as macro enabled workbook. (If you don't know how to check this post 'Save Your Macro'.)
No comments:
Post a Comment