S
Siv
Hi,
Does anyone know how to cancel the selection of a block that has been copied
programmatically using C# and Excel Interop.
This is my current code:
rng=XLApp.get_Range("OrigRows",m); //selects the
row named OrigRows
XLApp.CutCopyMode = XlCutCopyMode.xlCopy;
rng.Select();
rng.Copy(m);
rng.Insert(XlInsertShiftDirection.xlShiftDown,m);
The above copies teh selected row in a sheet and then pastes it as a new
row.
Next I just want to cancel the selection, if I record the action of pressing
"Esc" in Excel it gives the code:
Application.CutCopyMode = False
When I try to do the same thing in C# I only get offered two options:
XlCutCopyMode.xlCopy
XlCutCopyMode.xlCut
How do I say:
XLApp.CutCopyMode=false;
As usual C# and VBA are highly incompatible (why???).
Siv
Does anyone know how to cancel the selection of a block that has been copied
programmatically using C# and Excel Interop.
This is my current code:
rng=XLApp.get_Range("OrigRows",m); //selects the
row named OrigRows
XLApp.CutCopyMode = XlCutCopyMode.xlCopy;
rng.Select();
rng.Copy(m);
rng.Insert(XlInsertShiftDirection.xlShiftDown,m);
The above copies teh selected row in a sheet and then pastes it as a new
row.
Next I just want to cancel the selection, if I record the action of pressing
"Esc" in Excel it gives the code:
Application.CutCopyMode = False
When I try to do the same thing in C# I only get offered two options:
XlCutCopyMode.xlCopy
XlCutCopyMode.xlCut
How do I say:
XLApp.CutCopyMode=false;
As usual C# and VBA are highly incompatible (why???).
Siv