Insert Character into Editing-Cell

G

Guest

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.
 
G

Guest

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
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top