Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / July 2006

Tip: Looking for answers? Try searching our database.

Add a Char to the current cell

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Harish Shinde - 03 Jul 2006 13:34 GMT
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
CLR - 03 Jul 2006 14:14 GMT
Sub AppendSelectedCell()
Dim rng
rng = Selection.Value
Selection = rng & "@"
End Sub

Vaya con Dios,
Chuck, CABGx3

 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 07:16 GMT
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

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.