Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
mj mj is offline
external usenet poster
 
Posts: 78
Default Insert Character into Editing-Cell

I;d like to insert unicode character into a cell text which is on
cell-editing-mode
by outer application.
i tried to do it by "SendKeys" statement, but i failed.

How could i do that?

Thank you in advise.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 747
Default Insert Character into Editing-Cell

You can paste from the Office Clipboard while in Edit Mode. You need to set a
Reference to the Microsoft Forms 2.0 Object Library. Suggested way to get a
character into the Office Clipboard:

Sub PutInClipboard()
Dim txt As New DataObject
txt.SetText Chr(128) ' change to desired character
txt.PutInClipboard
End Sub

While in Edit Mode, right-click to bring up the shortcut menu. Click the
Paste button. It will paste the character at the point in the edit.

Regards,
Greg


"MJ" wrote:

I;d like to insert unicode character into a cell text which is on
cell-editing-mode
by outer application.
i tried to do it by "SendKeys" statement, but i failed.

How could i do that?

Thank you in advise.

  #3   Report Post  
Posted to microsoft.public.excel.programming
mj mj is offline
external usenet poster
 
Posts: 78
Default Insert Character into Editing-Cell

Greg, thank you very much for your advise.
i understand what u say and can get character in clipboard.

However, another problem occured.
....i couldn't send key-code by statement "SendKeys("^V")"
to its parent application.( Sorry to say late , but i'm using Vb.net )

Hnd = CLng(Me.ObjAppOrg.Hwnd)
Ret = SetActiveWindow(Hnd) ' Set Excel-window Foreground by API.
System.Windows.Forms.SendKeys.Send("^V") ' Send clipboard contents.

# Should i make another thread?

Thanks.

"Greg Wilson" wrote:

You can paste from the Office Clipboard while in Edit Mode. You need to set a
Reference to the Microsoft Forms 2.0 Object Library. Suggested way to get a
character into the Office Clipboard:

Sub PutInClipboard()
Dim txt As New DataObject
txt.SetText Chr(128) ' change to desired character
txt.PutInClipboard
End Sub

While in Edit Mode, right-click to bring up the shortcut menu. Click the
Paste button. It will paste the character at the point in the edit.

Regards,
Greg


"MJ" wrote:

I;d like to insert unicode character into a cell text which is on
cell-editing-mode
by outer application.
i tried to do it by "SendKeys" statement, but i failed.

How could i do that?

Thank you in advise.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert a special character in 1st and last position into a cell Mugge New Users to Excel 5 November 6th 07 09:38 PM
how to insert tab character into the cell? kang New Users to Excel 2 July 16th 07 01:01 PM
Insert Character At start of cell Andibevan[_2_] Excel Programming 1 May 17th 05 11:54 AM
Does Alt-Enter insert a non-printing character in a cell string? Henry Stock Excel Programming 3 February 23rd 05 09:28 PM
Insert a standard character in a cell of excel. JulieD Excel Worksheet Functions 5 November 19th 04 06:31 PM


All times are GMT +1. The time now is 02:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"