Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 126
Default stubborn Excel crash when editing code with code, one solution

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
A Very stubborn apostrophe that only shows in editing mode and the formula bar... duugg Excel Discussion (Misc queries) 4 May 17th 06 01:45 PM
Solution for ComboBox Code shashidharga[_2_] Excel Programming 0 October 3rd 04 04:45 AM
Reproducable Hard Crash in Excel 2003 (and earlier versions) with the following VBA code. David Battams Excel Programming 10 June 26th 04 01:50 AM
Problem with code causing Excel '97 to crash Pozzo[_6_] Excel Programming 0 June 16th 04 08:19 PM
Excel crash error code Ed[_17_] Excel Programming 1 February 16th 04 10:46 AM


All times are GMT +1. The time now is 02:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"