+ Reply to Thread
Results 1 to 21 of 21

Workbook crashes excel when a macro is performed.

  1. #1
    Registered User
    Join Date
    01-23-2009
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    23

    Exclamation Workbook crashes excel when a macro is performed.

    Something crashes my workbook in excel.
    It works fine with 32-bit Excel.
    It crashes with a 64-bit Excel.
    It only crashes if I click MENU & then DAY (2 to 30) or ADD A DAY & then when I DELETE A DAY it crashes.

    I've attached my workbook for download so someone could please narrow the problem down. Thanks.
    If you need the Password, it is: 1212

    Any ideas?
    Attached Files Attached Files
    Last edited by Phixtit; 06-18-2010 at 10:43 PM. Reason: I've added a cleaned workbook as attachment that works with Excel 32 and 64-bit.
    I am running Excel 2010 64-bit on Windows 7 Ultimate 64-bit.

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Workbook crashes excel when a macro is performed.

    Please Login or Register  to view this content.

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,256

    Re: Workbook crashes excel when a macro is performed.

    Just to perhaps save others some time, if you aren't using a 64bit OS the sample workbook will not work!
    Remember what the dormouse said
    Feed your head

  4. #4
    Registered User
    Join Date
    01-23-2009
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Workbook crashes excel when a macro is performed.

    Quote Originally Posted by snb View Post
    Please Login or Register  to view this content.
    I have tried your suggestion but it still crashes.

    Quote Originally Posted by romperstomper View Post
    Just to perhaps save others some time, if you aren't using a 64bit OS the sample workbook will not work!
    Sorry, I have edited my 1st post & have attached both versions 32 and 64bit versions.
    Last edited by Phixtit; 06-17-2010 at 05:50 PM.

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,256

    Re: Workbook crashes excel when a macro is performed.

    If it hasn't been fixed before then, I'll take a look at it tomorrow morning. Done too much Excel stuff today.

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,256

    Re: Workbook crashes excel when a macro is performed.

    I ran Code Cleaner on your workbook (it was behaving a little oddly) and it seemed fine after that.

  7. #7
    Registered User
    Join Date
    01-23-2009
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    23

    Question Re: Workbook crashes excel when a macro is performed.

    Quote Originally Posted by romperstomper View Post
    I ran Code Cleaner on your workbook (it was behaving a little oddly) and it seemed fine after that.
    So what should I change in the code to stop the crash?
    What is code cleaner?

  8. #8
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,256

    Re: Workbook crashes excel when a macro is performed.

    It's an add-in: http://www.appspro.com/Utilities/CodeCleaner.htm
    Try it and see (it basically cleans out all the crap p-code that builds up behind the scenes when you edit code)

  9. #9
    Registered User
    Join Date
    01-23-2009
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    23

    Question Updated 1st post in this thread

    Quote Originally Posted by romperstomper View Post
    It's an add-in: http://www.appspro.com/Utilities/CodeCleaner.htm
    Try it and see (it basically cleans out all the crap p-code that builds up behind the scenes when you edit code)
    I've done as you suggested and updated my 1st post in this thread with the cleaned workbook.

    It works fine with Excel 32 bit.
    ONLY problem is it crashes with Excel 64-bit.
    It only crashes if I click MENU & then DAY (2 to 30) or ADD A DAY & then when I DELETE A DAY it crashes.

    Any ideas?

  10. #10
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,256

    Re: Workbook crashes excel when a macro is performed.

    Did you clean both versions?

  11. #11
    Registered User
    Join Date
    01-23-2009
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Workbook crashes excel when a macro is performed.

    The VBA Code Cleaner doesn't work with Excel 64-bit so I cleaned it on another computer with 32-bit & added the PtrSafe so it works with both 32-bit & 64-bit and edited the 1st post attachment in this thread.
    Last edited by Phixtit; 06-24-2010 at 03:48 AM.

  12. #12
    Registered User
    Join Date
    01-23-2009
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    23

    Question Re: Workbook crashes excel when a macro is performed.

    *Bump*

    Any ideas?

  13. #13
    Registered User
    Join Date
    01-23-2009
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    23

    Question Re: Workbook crashes excel when a macro is performed.

    Quote Originally Posted by romperstomper View Post
    Did you clean both versions?
    Any ideas?

  14. #14
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,256

    Re: Workbook crashes excel when a macro is performed.

    Could you post the cleaned 64 bit version please?
    I don't always have access to my 64 bit machine so it takes time.

  15. #15
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Workbook crashes excel when a macro is performed.

    Maybe

    Please Login or Register  to view this content.
    Last edited by dominicb; 06-24-2010 at 04:21 AM. Reason: Chnage requested by phixit

  16. #16
    Registered User
    Join Date
    01-23-2009
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Workbook crashes excel when a macro is performed.

    Quote Originally Posted by romperstomper View Post
    Could you post the cleaned 64 bit version please?
    I don't always have access to my 64 bit machine so it takes time.
    I did, it's the attachment in the 1st post.
    Opens with 32 & 64-bit
    Last edited by Phixtit; 06-24-2010 at 03:44 AM.

  17. #17
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,256

    Re: Workbook crashes excel when a macro is performed.

    Ah, I missed that. I'll take a look when I get a chance.

  18. #18
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,256

    Re: Workbook crashes excel when a macro is performed.

    Just had a chance to take a look at this in XL64 and I can replicate but only if you delete the sheet that you called the form from, which doesn't surprise me particularly (since there is code running in that sheet when you delete it).

  19. #19
    Registered User
    Join Date
    01-23-2009
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Workbook crashes excel when a macro is performed.

    So, why does it work flawlessly on 32-bit? Any suggestions on what I could do to solve this issue with 64-bit?

  20. #20
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,256

    Re: Workbook crashes excel when a macro is performed.

    A bug in 32 bit?
    I'll have another look tomorrow (I try to avoid excel stuff at weekends)

  21. #21
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,256

    Re: Workbook crashes excel when a macro is performed.

    Personally, I would void using buttons on the sheets and go with a menu system, but for a quick fix it seems to work if you use OnTime to load the form:
    Please Login or Register  to view this content.
    I'd also suggest you could streamline your code to add the day sheets by making it into one routine that takes a day number as an argument, and then call it from each button.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1