+ Reply to Thread
Results 1 to 9 of 9

Workbook randomly crashing (attached)

  1. #1
    Registered User
    Join Date
    07-03-2012
    Location
    Leeds
    MS-Off Ver
    Excel 2007
    Posts
    41

    Workbook randomly crashing (attached)

    Hi. I posted a few days ago about this problem and forgot to attach an example.

    I have created a customer database in excel using a sheet full of vlookup cells, and some macros doing various tasks.
    This was working perfectly up until recently. Unfortunately I performed a few different maintanence steps all at once without proper testing in between so cant be sure what has cuased this.
    Empty Master Help.xlsm



    Symptoms:
    - Random crashing of excel. Usually when the worksheet is sat idle, but also occasionally on save.
    - Occasional "object not-found" when calling the "weeks" userform. When this happens, if i open vba editor and attempt to view the userform, excel crashes.

    Changes prior to problems
    -Used code cleaner to clean code up
    -Copied all data (values) and code to fresh worksheet to remove file links caused by prior copy/paste
    -Included icons to replace command buttons (since removed)
    Empty Master Help.xlsm
    Steps performed to try and fix;
    -Create a separate module for each macro
    -Removed pictures
    -Disabled splash screen and timer (made no difference so re-enabled)
    -Disabled ALL thisworksheet code (again made no difference)
    Empty Master Help.xlsm

    Im sure the error is simple and blatant but I am stuck. The crashes are causing significant frustration in the office. Any assistance would be received gratefully.



    Thanks in advance. Empty Master Help.xlsm
    Last edited by excelloser; 07-27-2012 at 04:38 AM.

  2. #2
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Workbook randomly crashing (attached)

    I think it would be helpful to be able to recreate the crashing but it hasn't for me. Also, you have four workbooks uploaded to the forum, are they all the same? I haven't opened all four because they share the same title.

    ---------- Post added at 10:15 AM ---------- Previous post was at 10:10 AM ----------

    Also, no one can look at your code as it is password protected.
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

  3. #3
    Registered User
    Join Date
    07-03-2012
    Location
    Leeds
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Workbook randomly crashing (attached)

    Quote Originally Posted by Mordred View Post
    I think it would be helpful to be able to recreate the crashing but it hasn't for me. Also, you have four workbooks uploaded to the forum, are they all the same? I haven't opened all four because they share the same title.

    ---------- Post added at 10:15 AM ---------- Previous post was at 10:10 AM ----------

    Also, no one can look at your code as it is password protected.
    All four are the same workbook at different stages. The issues only relate to the most recent upload.

    The password for vba is "zxsazx" and for protected worksheet is "1"

    Thanks for taking the time


    EDIT: This workbook is usually populated with 2500+ records (aprox 2000 master, 500canx)
    If required I can reupload with a similar number of example records.

    There is also a hidden worksheet which has been removed. None of the code / formulas link to this sheet.
    Last edited by excelloser; 07-26-2012 at 11:48 AM.

  4. #4
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Workbook randomly crashing (attached)

    Wow there are a lot of procedures to look at here. I've gone through your procedures and cleaned out some event procedures that were there but not actually being used. I have no idea if this will solve your problem but there is so much to look at that it is a little dismaying. Notice I indented all your procedures for the whole project. This makes your code a lot easier to read. At my own leisure, I am going to sift through your code line by line to see if there may be problems but I cannot do it all right away because of the volume of code. In the meantime, maybe someone else will come along and figure this out, hopefully.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-03-2012
    Location
    Leeds
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Workbook randomly crashing (attached)

    Yes sorry about the state of the code, some is redundant.
    The lack of tabs is down to code-cleaner, I assumed it would add/maintain tabs but it doesn't.

    I created a separate module for each procedure as I thought this might be a memory issue. I have read that excel loads a full module whenever a procedure is called.. made no difference.


    Im always amazed by the effort put in by forum users (i have always tried to offer the same in hardware forums) Your help is truly appreciated, please take as long as is needed.

    Thank you



    EDIT: All _canx procedures would be assigned to buttons which are not currently present but will be used, these are not redundant procedures.

    ---------- Post added at 06:39 PM ---------- Previous post was at 05:53 PM ----------

    On the file Mordred attached, as has happened on live file... had been left idle for 10mins.. clicked customer search button and received an object not found error. On debug (rarely available) it highlighted the only command in the procedure "userform1.show", which is clearly present in the forms list. If I double click userform1 excel crashes.

    I hope this helps diagnostics

    Please Login or Register  to view this content.
    Last edited by Cutter; 07-27-2012 at 08:02 AM. Reason: Removed whole post quote

  6. #6
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Workbook randomly crashing (attached)

    This is a tough one excelloser, I've had your workbook open for about 45 minutes straight and have had no issues. I've clicked every button, shape, and picture that I can and have not had the file crash. I've passed this problem onto the real Excel gurus so hopefully your problem will be solved soon.

  7. #7
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Workbook randomly crashing (attached)

    try closing excel and then search your hard drive for .exd files (you'll need to include hidden files and folders) and delete them. then start excel and try the workbook again.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  8. #8
    Registered User
    Join Date
    07-03-2012
    Location
    Leeds
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Workbook randomly crashing (attached)

    Just reading the definition of .exd files makes me think you may be onto something... I have edited vba code and userforms on all the pcs with issues.

    I will report back in the morning. Thanks again
    Last edited by Cutter; 07-27-2012 at 08:03 AM. Reason: Removed whole post quote

  9. #9
    Registered User
    Join Date
    07-03-2012
    Location
    Leeds
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Workbook randomly crashing (attached)

    Working perfectly thank you.


    I can now get on with the ideas Ive got, thanks again to all
    Last edited by Cutter; 07-27-2012 at 08:03 AM. Reason: Removed whole post quote

+ 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