As above. The following code copies the entire Textbox1 container, not just the highlighted selection.
Textbox1 text is on Userform1. Code is in a button on Usrform1.
1. The desired text anywhere in Textbox1 is highlighted
2. The button code "reads" and copies only the highlighted text to the clipboard
3. And pastes that highlighted selection in cell A1 of a sheet named VSEDITS
That's it. Images below may help to explain better.
Thanks for anyone's help. My difficulty is in "trapping" only the highlighted selection of any textbox text.
Code:
Private Sub CommandButton1_Click()
Dim MyData As New DataObject
MyData.SetText TextBox1.Text ---> copies entire textbox text - not what I want
MyData.PutInClipboard
End Sub
Textbox1 text is on Userform1. Code is in a button on Usrform1.
1. The desired text anywhere in Textbox1 is highlighted
2. The button code "reads" and copies only the highlighted text to the clipboard
3. And pastes that highlighted selection in cell A1 of a sheet named VSEDITS
That's it. Images below may help to explain better.
Thanks for anyone's help. My difficulty is in "trapping" only the highlighted selection of any textbox text.