As title indicates. It basically replaces Ctrl+C and Ctrl+V.
This code copies the entire textbox contents. Don't want that - just a manually highlighted string within the textbox text.
As mentioned, the code copies the entire "The quick brown fox ran up a tree"
How would the correct code only copy "ran up a tree" highlighted or "brown fox" highlighted
and paste in any textbox or document with a Paste button. or by right clicking ?
Thanks for anyone's help.
cr
This code copies the entire textbox contents. Don't want that - just a manually highlighted string within the textbox text.
Code:
Private Sub CommandButton1_Click()
Dim strclipboard As String
Set objData = New DataObject
strclipboard = TextBox1.Text
objData.SetText strclipboard
objData.PutInClipBoard
objData.GetFromClipboard
strclipboard = ""
strclipboard = objDataSetText
End Sub
As mentioned, the code copies the entire "The quick brown fox ran up a tree"
How would the correct code only copy "ran up a tree" highlighted or "brown fox" highlighted
and paste in any textbox or document with a Paste button. or by right clicking ?
Thanks for anyone's help.
cr