Results 1 to 6 of 6
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CalculationAutomatic Fails (XP; SR3)

    I can not get the calculation to reset to automatic using the following example:

    Sub MyCode()
    Application.Calculation = xlCalculationManual
    More code here
    Application.Calculation = xlCalculationAutomatic
    End sub

    I have tried opening the workbook as a repair and also saving it as a html page only to encounter the same issue.

    I also tried adding this piece of code but alas same issue.
    With Application
    .Calculation = xlManual
    End With


    If I create another SUB and run it; it works. But I can not call the new sub; it fails.
    Sub NewOne()
    With Application
    .Calculation = xlManual
    End With
    End Sub

    Your assistance is appreciated,
    John

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: CalculationAutomatic Fails (XP; SR3)

    If you change your code to this does it solve the problem?

    <code>
    Sub MyCode()
    Application.Calculation = xlCalculationManual
    ' More code here
    Application.Calculation = xlCalculationAutomatic
    Application.Calculate
    End Sub
    </code>
    Legare Coleman

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: CalculationAutomatic Fails (XP; SR3)

    Legare,

    I tried your suggestion and it still fails to reset it to the automatic calc and calculate the workbook.

    Regards,
    John

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: CalculationAutomatic Fails (XP; SR3)

    Does the problem persist if you copy the worksheet(s) into a blank new workbook?

    If so, could you post a stripped down (if necessary), zipped copy of the workbook? Replace sensitive data with dummy data.

  5. #5
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: CalculationAutomatic Fails (XP; SR3)

    Hans,

    I tried your suggetion prior to seeking assistance. Upon further analysis of the code and to my <img src=/S/blush.gif border=0 alt=blush width=15 height=15> chagrin I came across a section of code that had a reference to "END".

    Yep, that is how I am ending my day just like <!post=Alan,498175>Alan<!/post> .... nesting, nesting, nesting

    Thanks,
    John

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: CalculationAutomatic Fails (XP; SR3)

    Glad you solved it!

Posting Permissions

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