+ Reply to Thread
Results 1 to 6 of 6

Calc set to manual with VBA!

  1. #1
    Forum Contributor
    Join Date
    02-09-2015
    Location
    malta
    MS-Off Ver
    Microsoft 365
    Posts
    383

    Calc set to manual with VBA!

    Hi guys,

    If it is not too much of an inconvenience to ask, I would really appreciate any help on the below.

    I have an excel sheet named 'Planner' which includes a lot of calculations. To cater for this I have included a macro which when the file is opened will switch calculations to manual. Moreover, If someone saves it also disables auto recalculations. Finally when one exists the file automatic calculations will be switched on again. This works fine if I am only using 'Planner'.

    The code I inserted is the below:

    Please Login or Register  to view this content.
    Problem

    The only problem I am finding is that if there is another excel file which is already open (which will be on automatic mode), as soon as I open the 'Planner', it freezes everything. I am imagining that this is happening since the other excel file which is already open and is set to automatic calculations is interfering with this code on 'Planner'.

    Can the code above be changed to turn all open files to manual calculations as soon as 'Planner' is opened?

    Really appreciate a lot your help cause I can't seem to find a solution.

    Thanks a lot guys

    Keibri
    Last edited by Keibri; 12-22-2016 at 02:27 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Calc set to manual with VBA!

    Why bother with this at all?

    If you need to have calcs set to manual (because of lots of/slow calcs?), why not just set the file to manual calc. It will open and calc, only calc when you tell it, and then calc on save
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    02-09-2015
    Location
    malta
    MS-Off Ver
    Microsoft 365
    Posts
    383

    Re: Calc set to manual with VBA!

    Hi FDibbins,

    In effect you are right. However what was happening is that some users were switching the other files to automatic mode and then when this file is being opened it is not turning 'Planner' to manual cause I belief the calculation mode of one open document changes the mode for all open documents
    Last edited by Keibri; 12-23-2016 at 09:12 AM.

  4. #4
    Forum Contributor
    Join Date
    02-09-2015
    Location
    malta
    MS-Off Ver
    Microsoft 365
    Posts
    383

    Re: Calc set to manual with VBA!

    That's why it would be really great if the macro can be amended a bit to have all excel docs switched to manual mode.

    P.S Not sure if the code above is correct that's why I would really appreciate a lot your input! If it helps I can upload the file ( its a bit huge)

    Thanks a lot guys!

  5. #5
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Calc set to manual with VBA!

    Hi,

    You can't do that with code in a normal workbook because it will not run the code until the workbook has been calculated if another workbook is open already in automatic calculation mode. You could create an additional workbook that sets calculation to manual and then opens the actual planner, and have the users open that workbook instead. In my opinion you would be better off trying to improve the calculation of your workbook instead of inflicting manual calculation on all your users which will almost inevitably cause problems.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  6. #6
    Forum Contributor
    Join Date
    02-09-2015
    Location
    malta
    MS-Off Ver
    Microsoft 365
    Posts
    383

    Re: Calc set to manual with VBA!

    Ah I understand what you mean! Thanks for your suggestions.

    Yes you are perfectly right. I am trying to improve the calc in the meantime!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 05-31-2013, 07:17 PM
  2. Change Auto Calc to Manual by default
    By pdhawan in forum Excel General
    Replies: 6
    Last Post: 09-16-2012, 11:21 PM
  3. Using escape to exit manual calc iterations
    By wandb in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2008, 07:29 PM
  4. Disable Manual Calc in Options
    By Soltisolti in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-23-2008, 12:38 AM
  5. Need 1 cell to be manual & calc'd
    By mlk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-12-2008, 10:30 PM
  6. Manual Calc taking way too long
    By wbd_kelley@yaho in forum Excel General
    Replies: 2
    Last Post: 05-13-2008, 02:06 PM
  7. Replies: 0
    Last Post: 07-25-2006, 04:30 PM
  8. Automatic Manual Calc When Opening!!
    By twogoodtwo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-10-2005, 02:20 PM

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