How to force a formula reclaculation

Posted by: john-shugart on 8 September 2017, 1:38 pm EST

  • Posted 8 September 2017, 1:38 pm EST

    I have a spread, that has a numeric up/down spinner. I have formula's tied to the cell value that I would like to recalculate as the spinner moves, but the RecalculateAll, doesn't recalc. When the EditModeOff event fires, everything is recalculated. Is there a way I can force the formula recalculation when the value changes?

    Thanks in advance,


  • Replied 8 September 2017, 1:38 pm EST


    The Spread's DataModel is not updated until the cell goes out of editmode. There is not an eloquent way of programatically exiting editmode and entering editmode whenever a change is made.

  • Replied 8 September 2017, 1:38 pm EST

    Any suggestions on how I could accomplish this???

    Thanks in advance...

  • Replied 8 September 2017, 1:38 pm EST


    Not any great suggestions. You can put code in the EditChange event to set the EditMode property to False and then set it back to True. But if your users want to be able to click on the spinner and keep it pressed, this will cause problems.

  • Replied 8 September 2017, 1:38 pm EST

    Thanks Bob, I did notice when the user keeps spinning the Spread has an issue with the editor. I have coded the routine to change my values manually, but when I assign a cell.value it doesn't take.

    Does this have something todo with editmode being true?

    <FONT color=#0000ff size=2>

    If</FONT><FONT size=2> sv.ActiveColumnIndex = Cell.B </FONT><FONT color=#0000ff size=2>Then

    </FONT><FONT size=2>

    sv.Cells(sv.ActiveRowIndex, sv.ActiveColumnIndex + 2).Value = sv.ActiveCell.Value

    sv.Cells(sv.ActiveRowIndex, sv.ActiveColumnIndex + 2).Text = sv.ActiveCell.Text

    </FONT><FONT color=#0000ff size=2>End</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>If

  • Replied 8 September 2017, 1:38 pm EST


    Yes. This is because editmode is true. As I said there is not a way to get this to work as you are expecting.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels