Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
625
Trouble Setting A Cells Value....
posted

The behavior I'm trying to get; is that when a user enters a cell (either by clicking or tabbing), my code responds to that event, creates a new form, shows that new form and when the user is finished with that form, a value is returned and my code sets the cell's value to equal that return value.

My problem is that when I execute the line of code 

'myCell.Value = "Anything"'

The value of that cell doesn't get set at all.  It still appears as "".

I've tried this in a few different events now, and I'm guessing I just haven't found the right one.  BeforeEnterEditMode/AfterEnterEditMode/AfterCellActivate.  I've also tried using myCell.SetValue(strMyReturnValue, false) but that doesn't seem to work either.

Does anyone know what I'm doing wrong?

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hm... perhaps you don't see the new value because the edit window is covering the cell. Before you set the value, try calling grid.PerformAction(ExitEditMode) and seeif that helps. I would do ths in the AfterCellActivate. 

Children