View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Andy Smith[_2_] Andy Smith[_2_] is offline
external usenet poster
 
Posts: 50
Default VBA macro resul Microsoft Excel for Windows has encountered a prob

You should have all your code in a template, and all your of sheets based on
that template. Look also into add-ins.

--
* Please click Yes if this was helpful *
Andy Smith
Senior Systems Analyst
Standard and Poor''s, NYC



"KT1972" wrote:

I have 100s of excel workbooks and each of them has the same macros to run.
Sometimes it is required to change macros. I have written a macro in another
excel page (using vbcomponent etc) and use it many times it and run
successfully. Last time I have added a code to all excel workbooks starting
"sub workbooks_deactivate()" and there was no problem. Whenever I deactivated
a workbook, code in sub was running.

But last time I tried the add another sub with same macro, EXCEL crashed. I
found that if I delete the "sub workbooks_deactivate()" from excel workbooks,
my code is running. Of course I don't want to update 100s of macros manually.
Waiting for help