Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Saving (2007/SP1)

    I have a small accounting workbook of approximately 1 Mb, consisting of 25 worksheets (no graphs or pivot tables).

    There is a lengthy collection of code which interrogates the volume of data and based on the results, sets up the sheets for printing. This activity includes setting column widths and page breaks. On completion of this the file is saved. But not quite Excel crashes rather than save.

    Setting a break point at the save command, then terminating the code and manually saving the workbook also causes Excel to crash.

    Inserting a Save command at many points in the process (nominally after each sheet is set up), allows the code to work without a problem.

    Any insight will be greatly appreciated. Yes I am grudgingly willing to leave these extra saves in the code, but I detest things that go bump in the night, and resist my attempts to understand them. <img src=/S/spook.gif border=0 alt=spook width=15 height=15>

    T.I.A.
    Regards
    Don

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Saving (2007/SP1)

    Could you post your code?

    I suspect adding some DoEvents and/or Calculate commands in due places might fix the issue.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Saving (2007/SP1)

    Thanks for the response Jan Karel

    The attached file contains the code in question. Unfortunately you will not be able to step through it as the data and its structure is too sensitive to allow exposure.
    Attached Files Attached Files
    Regards
    Don

Posting Permissions

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