+ Reply to Thread
Results 1 to 5 of 5

Excel Crashing when loading Form

  1. #1
    Registered User
    Join Date
    11-02-2007
    Posts
    29

    Excel Crashing when loading Form

    Hello, I've created a quote template in Excel and for some reason my excel file will sometimes crash (at random uses of file) when switching from Form 2 to Form 3. With the below code, it closes Form 2 and then shows Form 3. But when Form 3 is activated, the code in the attached txt file runs. I don't know where exactly the program crashes, but somewhere between these 2 sets of code, Excel will completely crash. The strange part is, it does not happen every time the code is run. It happens at completely random times, but it is always when going from Form 2 to Form 3. The first section of code is below, this switches the forms from Form 2 to Form 3. Due to size, I've attached the code for when Form 3 activates. Any idea why it crashes? Thanks.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Excel Crashing when loading Form

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Excel Crashing when loading Form

    Does it crash on the first occasion of switching to the other form, or have there usually been a few switches back and forth first?
    Remember what the dormouse said
    Feed your head

  4. #4
    Registered User
    Join Date
    11-02-2007
    Posts
    29

    Re: Excel Crashing when loading Form

    Quote Originally Posted by romperstomper View Post
    Does it crash on the first occasion of switching to the other form, or have there usually been a few switches back and forth first?
    It can happen to both scenarios. Once a particular file starts crashing, it will always crash, however we've noticed that we can "fix" the file and prevent it from crashing. There are multiple frames and within each frame there are checkboxes. We've noticed that if we check and uncheck any of the boxes within the frames it could fix the file. The way we know is if we check a box and it takes a couple of seconds to register, then when we go to Form 3 it will not crash. If the selection of a checkbox is instantaneous and we try to go to Form 3, it will crash. So users will just keep checking and unchecking random check boxes until it takes a couple of seconds to register, then they know they've "fixed" the crash and can move to Form 3. Hopefully that makes sense.

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

    Re: Excel Crashing when loading Form

    I never found any reason to use more then 1 userform.
    Did you explore the option of using a multipage in a userform ?

    Besides, I amended the code you posted:

    Please Login or Register  to view this content.
    There's a lot more to improve the code; for instance:

    instead of:

    Please Login or Register  to view this content.


    use:
    Please Login or Register  to view this content.
    Last edited by snb; 10-25-2011 at 11:00 AM.



+ 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