Thank you so much Peter for your solution. It is what I need it but I still
have to
solve how to update my clipboard after I copy/paste fist string and I dont
know where and how to put your code in Excel.
If I put the code under a Click_Button I have to click it all the time which
is not convenient.
"Peter T" wrote:
If you can control all about putting into the clipboard, to put it into
cells two ways
Simple way -
Range("E7").PasteSpecial
with a lot more control -
First ensure the project has a reference to MS Forms, quick way is to add
(and remove) a userform
Sub test()
Dim s As String
Dim dob As DataObject
Set dob = New DataObject
dob.GetFromClipboard
s = dob.GetText
' now do whatever with s, eg
' Split() to parse into multiple lines or simply
Range("B12").Value = s
End Sub
Regards,
Peter T
"Dan Tabla" wrote in message
...
It is an old application developed in C and I can make selection and copy
it
which I can see it on Excel Edit/Office Clipboard.
Problem is that I dont know how to automatically retrieve it from there
and
paste it in the
ActiveSheet.
Thanks a lot for you answer!
"Peter T" wrote:
Any solution, if any, would depend entirely on what the other application
is, in particular whether it supports automation and depending on the app
(eg IE, Word) knowing where the text is you want to copy.
Regards,
Peter T
"Dan Tabla" wrote in message
...
Hi all,
Please give me any suggestion regarding how to send to Excel, 5 strings
that
I'm getting manualy by selecting/copy from another application.
I tryed my best and searched internet but I couldn't solve it.
Clipboard looks helpful but..
http://www.cpearson.com/excel/Clipboard.aspx
For example:
For i=1 to 5
ActiveSheet.Cells(1,i)=Selection/copy(i)
Next i
Thank you very much for any solution!
.
.