Hi Experts

i am trying to write text on excel sheet ,i am using the following
code:

appXl.ActiveCell.Value2 = "Sample Text";

this is working fine when a cell is selected but

its not working when the cell in edit mode

the same functionalty is working by selecting : insert -- symbol from
excel 's toolbar