Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jun 2008
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can't read memory

    w2000,O97. I have a large workbook that includes many macros. I create a toolbar on the fly. Sometimes when I save my workbook, it crashes with one of those ugly "cant read memory at x%$#!" messages. It seems to have something to do with populating the toolbar. Here is the strange thing: If I set the autoopen routine to send out a message box so I can break the execution, and if I then step it through the entire open process, the problem disappears! It's as if stepping through the routine cleans up some kind of missing reference, and then when I save the workbook, it works from then on. Until I do something related to the toolbar, then I have to go through this process again. Any clues as to what is happening here?

  2. #2
    picarules
    Guest

    Re: Can't read memory

    How many icons are you placing in the toolbar?

    Sorry for a wild guess but I recently had trouble with a toolbar that contained more icons than it was showing. The only way I found this out was by clearing the bar of all icons one at a time. I have a suspicion that the database (Jet?) for toolbars isn't particularly well implemented. In your case you might try pausing between insertions (the effect of stepping through your code) IN your code.

  3. #3
    New Lounger
    Join Date
    Jun 2008
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Can't read memory

    I create the toolbar from scratch, so I don' think there are any phantom hidden buttons. I could pause between creation of them, but I don't understand why that would work. If it crashed all the time, I could see that it was timing, but it only crashes until I step through it once, then it stops crashing. Very puzzeling.

Posting Permissions

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