Results 1 to 7 of 7
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    corrupted template while editing (Word97SR2)

    I'm not really looking for a solution; this is more of "tell me I'm not alone".

    About once a month I seem to get a horribly corrupted template. The more it happens, the more I focus on what causes it. I may never find out (its Word97 after all) but I'm getting close. I don't want (me or you) to devote time to it, but if I knew for sure what "bad practice" caused it, I'd avoid that practice. After all, when Word crashes, I usually end up rebbooting to shake off the shackles that Word leaves on a document, and then make a fresh copy of the template, if I can. If I can't make a fresh copy, I have to drop back to the previous version and re-code my recent changes. Yuck!

    This evening, again, a crash.

    I was inserting a real simple GUI form with four command buttons. "OK", "Cancel", "Purge Table" and "Purge File". Nothing more complex than an IF statement and a KILL statement in the two most complex commands.

    Word crashes.

    As near as I can see, it happened as a result of my double-clicking (in a standard module, not the GUI) "Public" in one statement, Ctrl-C to copy it to the clipboard, and then double-clicking and Ctrl-V to paste on two "private" keywords. The statements were constant declarations referenced from the GUI form.


    If anyone else has mysterious crashes while editing GUI forms, I'd love to hear from you.

    Again, I don't anticipate a solution, but would like to avoid the minefield.

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: corrupted template while editing (Word97SR2)

    By itself, just cutting and pasting code wihin the VBIDE ain't gonna cause a crash.

    You can try refreshing your template by creating a clean template, exporting ALL the modules from the old template, and then importing them into the new template.

    Individual Userforms can get corrupted. If you were running code withing a Userform, maybe that caused a crash. This type of problem is very hard to track down. Could be easier to reconstruct the Userform and copy the Userform's code.

  3. #3
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: corrupted template while editing (Word97SR2)

    I get an occassional lock up (I mean I have to shut down Windows 'cause Word is froze dead and ain't comin' back) when switching the Properties window on with the F4 key. If I use the mouse and click the mene items it does not happen. It seems to happen most often after a lot of testing that includes object creation, codus interuptus, object abandonment (the Set objObject = nothing code never gets a change to execute and the Subs or Functs never hit the End line.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: corrupted template while editing (Word97SR2)

    >By itself, just cutting and pasting code wihin the VBIDE ain't gonna cause a crash.

    Well, it sure seems that way.

    Out of Interest I went to freeanswers.com, chose Microsoft, Word, and typed in the question "Why does VBE crash when I copy and paste?". asking for 50 results. I got them. As far as i can see/read the answers all relate to applications (Word, Excel etc). I see no mention of VBE.

    However, I frequently get crashes within VBE when I try to copy/paste or Ctrl-Drag code while the procvedure is in suspended state (the yellow highlight bar during codus intteruptus).


    > , and then importing them into the new

    Agreed. I have had far too much experience in recovering crashed/corrupted templates. I know how to do that. I'm looking here for the definitive event or action that causes the crash. If I could isolate that one cause, I'd avoid it like the plague!

  5. #5
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: corrupted template while editing (Word97SR2)

    >when switching the Properties window o

    Hmmm. I think I've never used the F4 key. I either right-click on an object and choose properties, or do it from the View menu.


    > after a lot of testing that includes

    This I can see. Trouble is, when it happens after, say, one hour of testing, I can't be sure whether it's because of something I've just done, or some latent devil lurking for the past hour.

    If enough hints about "mouse" crop up, I could try keyboard-only for a while, but the freeze/corruption could be dormant for a month, and I'd never know .....

  6. #6
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: corrupted template while editing (Word97SR2)

    I think it's a memory leak in Word VBA.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  7. #7
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Bladder problems

    >I think it's a memory leak in Word VBA.

    Well I wish MSoft would stop leaking all over my template.

    I'd still like (ultimately) to track down what I'm doing that adds to the leak.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •