I need some help on how to copy a quite complicated excel macro to another computer without having to sit down at the second computer and re record the macro. I am also interestred in how to modify a macro without having to re record it. Any input from you, web sites, or books that you know of would be great. I am the IT Mgr at our company. Have written many macros for myself and users, but have always re recorded it on their system.
Copy the workbook in question to a thumb drive and transfer the entire file to the new PC. If it has to go into another workbook, once the workbook has been transfered, click the Visual Basic editor>Click on the module where the macro is located > copy the macro. Open the workbook you want to copy to, click the Visual Basic editor>Click on insert> insert standard module> paste in the window that appears to the left. That is all you need to do.
If you are happy with the answer, please click the Star icon in the below left hand corner.
Good sites to start learning.
snb's VBA Help Files
Jerry Beaucaires Excel Assistant
J & R Excel Consultancy Services
How to post code correctly: Correct Code Posting
Hi mickeyw3340
I'd suggest you try the Export/Import feature of VBA. It allows you to export a module to a file and to import that module to a new VBA application.
Regarding thisYou CAN modify code WITH code...what is it you wish to modify?I am also interestred in how to modify a macro without having to re record it.
John
If you have issues with Code I've provided, I appreciate your feedback.
In the event Code provided resolves your issue, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.
Thanks Jaslake and JapanDave
two things additional... If I want the code to transfer from my personal.xls to the employee's personal.xls, I assume that that is the workbook that would be my source and destination?
Also the additional code I mentioned would be in the case where I forgot to put boldface on a title, or forgot to increase the font size of a label cell, etc. What I have done for years is just record a second macro to do the missing steps. Then when I create the workbook, I would run the primary and then the secondary. I would like to know how to get the secondary code into the primary, even at the end of the code. Is there a tag at the end that tells me where to paste the secondary code?
The Export/Import code module approach will work for both your situations.
Export from your Personal.xls workbook, transfer that .cls file to their computer, and import it to their Personal.xls workbook.
For updates, export the whole module, including updates, delete their existing module and import the new. You can use CustomDocumentPropreties to create a MostRecentMacroUpdate property to keep track of what updates the end user might need.
_
...How to Cross-post politely...
..Wrap code by selecting the code and clicking the # or read this. Thank you.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks