View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
PO PO is offline
external usenet poster
 
Posts: 66
Default Using code to replace code modules

Excel 2003, SP2

Hi,

I have distributed a custom template among the coworkers in my company. The
template creates a custom menu. There is however a bug in the menu creation
code and I need to replace it. I have sent out new templates but I still
need to fix the workbooks created by it.

The plan is to have them email me the workbooks and replace the faulty
module "Menus" with a new one (also called "Menus"). I will get help
replacing the modules but the person who will help isn't familiar with the
VBE and I don't want him to have replace the module manually.

Therefore, is there a way to use code (in a separate workbook) to:

1. Unprotect the project (password is RevCalc)
2. Remove the faulty module (Menus)
3. Import the new module (at c:\data\Menus.bas)

Regards
PO