BobBridges
Active Member
I've seen hints here and there that VBA can manipulate VBA modules, but I've never really gotten a handle on how it works, not in detail. Can someone explain it, or point me to a page that does a decent job?
What I'm after is to be able to write a program that looks at two .xlsm workbooks, and copies all the modules from one to the other, replacing all. That is, delete all the code modules in A and copy all the modules from B to A.
If it helps to know, the purpose is this: I have users who are constantly modifying data in a worksheet with many worksheets. I have written some programs to help them, so the workbook not only has dozens of worksheets but also a few dozen modules and class modules. As things stand now, when they want me to enhance the programs they have to stop work on the data and send the workbook to me; when the updates are ready I send the workbook back and they can resume modifying the data. It'd be more convenient if I could work on program code in my own copy of the workbook at the same time they're updating the contents of the worksheets in a copy at their end; from time to time they could send me their workbook, I'd replace their program code with my updates and send it back right away, thus delaying them only a few hours.
What I'm after is to be able to write a program that looks at two .xlsm workbooks, and copies all the modules from one to the other, replacing all. That is, delete all the code modules in A and copy all the modules from B to A.
If it helps to know, the purpose is this: I have users who are constantly modifying data in a worksheet with many worksheets. I have written some programs to help them, so the workbook not only has dozens of worksheets but also a few dozen modules and class modules. As things stand now, when they want me to enhance the programs they have to stop work on the data and send the workbook to me; when the updates are ready I send the workbook back and they can resume modifying the data. It'd be more convenient if I could work on program code in my own copy of the workbook at the same time they're updating the contents of the worksheets in a copy at their end; from time to time they could send me their workbook, I'd replace their program code with my updates and send it back right away, thus delaying them only a few hours.