I tried but Selection Object in C# is a readonly
here is my lines of code
----------------------------------------------------------------
object rng;
Microsoft.Office.Interop.Excel._Application appXl = (Microsoft.Office.Interop.Excel._Application)applicationObject.GetType().InvokeMember("Application", BindingFlags.GetProperty, null, applicationObject, null);
rng = appXl.Selection;
appXl.Selection = rng & "@";
---------------------------------------------------------------------------------------------------------------------------------------------------
-Harish Shinde
Sub AppendSelectedCell()
Dim rng
rng = Selection.Value
Selection = rng & "@"
End Sub
Vaya con Dios,
Chuck, CABGx3
"Harish Shinde" <harish@suviinfo.com> wrote in message news:e5pIt1pnGHA.4868@TK2MSFTNGP02.phx.gbl...
hi,
I have a custom commandbutton. On click of this commandbutton I need to add a Char '@' to the current cursor location on the Excel Sheet. While using range Interop object I m able to replace the current cell data with the above char but I need to append it.
Could anyone help me please :))
Thanks in Advance...
-Harish Shinde
Harish Shinde - 04 Jul 2006 14:50 GMT
I tried with Value2 it is adding the char on entire cell ...but not adding in-between while editing the current cell..
Any help is appreciated...
Thanks,
I tried but Selection Object in C# is a readonly
here is my lines of code
----------------------------------------------------------------
object rng;
Microsoft.Office.Interop.Excel._Application appXl = (Microsoft.Office.Interop.Excel._Application)applicationObject.GetType().InvokeMember("Application", BindingFlags.GetProperty, null, applicationObject, null);
rng = appXl.Selection;
appXl.Selection = rng & "@";
---------------------------------------------------------------------------------------------------------------------------------------------------
-Harish Shinde
"CLR" <croberts@tampabay.rr.com> wrote in message news:uzu1DJqnGHA.4572@TK2MSFTNGP05.phx.gbl...
Sub AppendSelectedCell()
Dim rng
rng = Selection.Value
Selection = rng & "@"
End Sub
Vaya con Dios,
Chuck, CABGx3
"Harish Shinde" <harish@suviinfo.com> wrote in message news:e5pIt1pnGHA.4868@TK2MSFTNGP02.phx.gbl...
hi,
I have a custom commandbutton. On click of this commandbutton I need to add a Char '@' to the current cursor location on the Excel Sheet. While using range Interop object I m able to replace the current cell data with the above char but I need to append it.
Could anyone help me please :))
Thanks in Advance...
-Harish Shinde