erik.van.geit
MrExcel MVP
- Joined
- Feb 1, 2003
- Messages
- 17,832
Hi, folks,
Is there a simple function that can "see" which part of the text in a userform textbox is selected?
example
textbox 1 contains "text1 text2 text3"
the word in the middle is selected
then you click a button which executes my "fantasycode"
Me.Controls("Textbox1").SelectedPart.Copy (or copy to clipboard)
I see one major problem: clicking the button the Textbox isn't selected anymore
would the doubleclick-event be a solution ?
doubleclicking a word selects it
Private Sub txt_tb_DblClick(ByVal Cancel As MSForms.ReturnBoolean)SelectedWord.Copy ...
End Sub
I think there are some large codes on the internet who meet this problem. Needing so simple task, do we need so much lines of code?
A solution or some links would be greatly enjoyed
kind regards,
Erik
Is there a simple function that can "see" which part of the text in a userform textbox is selected?
example
textbox 1 contains "text1 text2 text3"
the word in the middle is selected
then you click a button which executes my "fantasycode"
Me.Controls("Textbox1").SelectedPart.Copy (or copy to clipboard)
I see one major problem: clicking the button the Textbox isn't selected anymore
would the doubleclick-event be a solution ?
doubleclicking a word selects it
Private Sub txt_tb_DblClick(ByVal Cancel As MSForms.ReturnBoolean)SelectedWord.Copy ...
End Sub
I think there are some large codes on the internet who meet this problem. Needing so simple task, do we need so much lines of code?
A solution or some links would be greatly enjoyed
kind regards,
Erik