+ Reply to Thread
Results 1 to 13 of 13

Worksheet keeps crashing - is it coding issue or too many preparation formulae

  1. #1
    Forum Contributor
    Join Date
    12-14-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    106

    Worksheet keeps crashing - is it coding issue or too many preparation formulae

    HI ALL

    Over the last few months you all have helped me no end to get a finished workbook that my place of work can use to order transport, calculate the pallet configurations for the order and creat a despatch sheet.

    THis was my first attempt at vba and everytime I appear to finish my project I encounter the problem that it crashes the next time I open the file and will then not reopen. I am not sure whether this is due to my coding being too basic and whether I could apply the same code across several sheets as opposed to writing it on each week I require transport. Or alternatively I use a lot of formulae with =indirect function in. I have read on here that that can cause issues.

    Any suggestions wud be massively appreciated as I have spent so many hours trying to complete this and really do not want to fail at the last hurdle. I have attached a slimmed down version of my spreadsheet that contains only half the number of weeks.

    Basically the ws works as follows:

    1) index sheets allows you to select which week you want to do the transport for. THis makes that sheet visible and you then can jump to that sheet.

    2) Opperman and browns sheets are a summary of the other sheets costings.

    3) Each of the Week Sheets (that are hidden until chosen on index sheet) have a drop down menu to select the day of the week. ONce day is selected hiudden rows are revealed. Following inputting that days data you click onto the transport and despatch buttons at top to take you to the relevant sheet. Print these sheets and job done for day.

    Apologies for rubbish explanation but once in the ws you will see it makes a lot more sense than I am currently making.

    Grrr file is too large to load on this site as it is 2.5mb. Does anyone know what the limit for size is?

    If you require anything further please let me know.

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Worksheet keeps crashing - is it coding issue or too many preparation formulae

    I think it's 1Mb
    Elegant Simplicity............. Not Always

  3. #3
    Forum Contributor
    Join Date
    12-14-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: Worksheet keeps crashing - is it coding issue or too many preparation formulae

    Hi again

    I have been reading some other threads and one suggested cause is that I am using office excel 64bit. Has anyone else encountered this issue and if so has a cure been found?

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Worksheet keeps crashing - is it coding issue or too many preparation formulae

    Have you investigated why/where it's crashing?

    Perhaps you could set up some breakpoints in the code (F9) and step through it with F8 to set what's happening.

    Are there any error messages when Excel 'crashes'?

    Is there anything in particular in the code, or in the worksheets, that you think might be the cause of the problem?

    Perhaps you could post some examples of the formulas and code you have.

    PS Unless you are using Windows API then using 64-bit shouldn't be a problem.
    If posting code please use code tags, see here.

  5. #5
    Forum Contributor
    Join Date
    12-14-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: Worksheet keeps crashing - is it coding issue or too many preparation formulae

    Sadly I cant investigate why/where it is crashing as the minute I click enable macros at start up it crashes and box appears stating:

    "excel is trying to recover your information, please wait this may take several minutes" and just hangs for ages and then closes file.

    The code is probably a bit cumbersome but nothing massively complex in there. Each of the Week sheets has the following code including in

    Please Login or Register  to view this content.
    Repeat this code on every worksheet. WHen I have less than 5 ws with this code on all seems well but when I go above that and do a reopen it seems to crash.
    Last edited by chrisjames25; 04-15-2013 at 01:30 PM.

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Worksheet keeps crashing - is it coding issue or too many preparation formulae

    Is there code that is triggered when the workbook opens, straight after macros are enabled?

    What happens if you don't enable macros straight away?

  7. #7
    Forum Contributor
    Join Date
    12-14-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: Worksheet keeps crashing - is it coding issue or too many preparation formulae

    Hi Norie.

    If I do not enable macros then the file does not crash.

    Unless I have accidentally triggered something to fire straight away I do not believe any macros are triggered when opening the document.

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Worksheet keeps crashing - is it coding issue or too many preparation formulae

    Can you create a stripped down version of the workbook, eg remove data/formatting, and attach that?


    PS You almost got the code tags right, the closing tag is [/code].

  9. #9
    Forum Contributor
    Join Date
    12-14-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: Worksheet keeps crashing - is it coding issue or too many preparation formulae

    So close with the code tags. Will get right next time promise!!!

    HEre is a stripped down version of the ws. When it opens on the index tab from the drop down combobox only choose week 4 as that is the only sheet that still exists. Once in there you will be able to have a play and see what the code above does.

    Many thanks
    Attached Files Attached Files

  10. #10
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Worksheet keeps crashing - is it coding issue or too many preparation formulae

    You do seem to have a lot of formulas INDIRECT

    Is there a reason for that?

    Is it because some of the weekly sheets don't exist yet?

    How many sheets like 'Browns' and 'Opperman' do you have?

    Do they all have so many formulas?

    PS You could go back and edit the closing tag.

  11. #11
    Forum Contributor
    Join Date
    12-14-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: Worksheet keeps crashing - is it coding issue or too many preparation formulae

    The Opperman browns and index sheets are the only ones of those type I need. So admittedly my use of indirect function in those was lazy of me and purely used to avoid me linking each of the different week sheets to those.

    The indirect function in the transport and despatch sheets are required I believe. Because the plan is to duplicate week 4 for each week of year so 1-52. And when u click on the transport or despatch command buttons the week number of the current sheet is inserted into a1 of the transport sheet and the rest of the data on that sheet is then linked via this indirect function.

    Here is the code for changing the week number on that tab

    Please Login or Register  to view this content.
    If you copied week 4 and renamed it week 5 and changed the cell at top of sheet to week 5 as well you will hopefully see what the above rumblings mean.

    Will go back and edit for u
    Last edited by chrisjames25; 04-15-2013 at 01:32 PM.

  12. #12
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Worksheet keeps crashing - is it coding issue or too many preparation formulae

    Chris

    Are the formulas used to get data from other worksheets to create summarys?

    Do they need to be dynamic?

    What I wondering is if it's possible to just copy data rather than use formulas.

    Say for example in week 6 append the relevant data to the relevant place in the relevant worksheet.

    By the way, I've got a kind of 'theory' why the workbook is crashing.

    The 'theory' is that when the file is opened, after you've enabled macros, all the formulas are being calculated and that's what's causing the problem.

    Just a 'theory' though.

  13. #13
    Forum Contributor
    Join Date
    12-14-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: Worksheet keeps crashing - is it coding issue or too many preparation formulae

    THe formulas in the opperman and browns sheet are used to get a summary of other sheets so I can amend them to not be indirect functions easily enough.

    We have 6 computers at work and this morning I have tested the complete file on all the computers. The only one that crashes is mine and I am the only one running office 64 bit so im starting to think that it may be the cause of the issue.

    THis article seems to suggest there is an issue with 64 bit office as well. http://social.technet.microsoft.com/...-9d1d46e7975f/

    Any thoughts.

    Perhaps I should do a reinstall of office and see if that removes issue.

+ 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