Forum Discussion
BWe66
Sep 07, 2022Copper Contributor
Copying Macro from one workbook to another
I am trying to copy a macro from one workbook to another. Source workbook has 2 Macros, When I go into visual Basic there are 7 modules listed and only one macro shows and not the one I want to copy. How do I get to the second Macro?
- BWe66Copper Contributor
I think figured out WHY there were 7 Modules and only 2 Macros. The Modules were auto built as I was building Macros and had to delete a Macro because I messed up writing macro and then deleted it. The Module do not Delete when Macro is Deleted. I found the 2 Modules that had the Macros by Deleting each Module until the Macro details on right side of screen disappeared. Closed Workbook WITHOUT saving workbook. Then repeated process with the other Macro selected and it's steps disappeared. Again, closed file without saving. Then went back in and deleted the 5 modules without Macros in them. THEN Saved Workbook.
Would be nice if Modules deleted when Macro is deleted if I am correct on this. . Also, a way rename modules.
Thanks for everyone's time reading post!
Hopefully this will help someone else