CellChanged Event Infinite Loop.

P

pkkamisetty

Hi,

I am listening to the Cell Changed event and calling an event handler

to handle this event. I am using addadvise method to listen to this event.

I am able to listen to the event but it gets into an infinite loop.

I am calling

AddCustomField(formula, format) function inside of the

handleCellChangedEvent() event handler.

Can you please help.

My goal is to change the shape's text when the user changes the custom
property.


Thanks
Kamisetty.
 
A

Al Edlund

that's because the action (changing the field) causes another cell change
event. Consider testing the cell changed event to make sure you're not
reading the wrong fields.
al
 
P

pkkamisetty

Al,

Thanks for the info. I fixed the problem by setting the value of the
shape.text with the cell.formula, inside of the handlecellchanged event
handler.

But when I call the "AddCustomField" I am still getting the same problem.

I am not I understand what you mean by...

"Consider testing the cell changed event to make sure you're not
reading the wrong fields."

Are you saying that I should be hearing for the cell changed event for that
particular cell?

If so. How can I do that?

Thanks
 
A

Al Edlund

when the cell changed event fires it will tell you what cell in what shape
was changed, write your selection logic to look for the specific cell you
want to test for (i.e. the custom property prop.abc )before calling the
addcustomfield.
al
 
P

pkkamisetty

Al,

Thanks for the information.

I am able check on the cell.section and cell.rowname and called the
addcustomfield inside of the cellchanged event handler.

Praveen.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top