Dear Group,

I've recently begun editing code with code, and I had been getting a =
great deal of crashes when doing this. When I searched the group =
archives I didn't really find anything that helped, but I have stumbled =
onto something that seems to have cured the crashes (at least for now).

I was doing something pretty straightforward. Writing a single Sub to a =
worksheet's codemodule, replacing it if a procedure by the same name was =
already there. Excel would crash after seeming to successfully complete =
the writing of the Sub, and then continuing on with the code that called =
this in the first place.

I was using an object variable for the CodeModule along with the =
..DeleteLines and .InsertLines methods. After using .DeleteLines, =
re-Set-ting this object variable before calling .InsertLines cured the =
crashes.

I hope somebody finds this helpful,

Brian Murphy