Sorry for putting up series of richtextbox questions... anyways.. if you have three rtf boxes in your form, and user clicks the cmdCopy, which should copy the selected text, how do you know which rtfboxes to get the text from?
Printable View
Sorry for putting up series of richtextbox questions... anyways.. if you have three rtf boxes in your form, and user clicks the cmdCopy, which should copy the selected text, how do you know which rtfboxes to get the text from?
I came up with an idea, and it worked.
Code:Dim rtbfocus As String
Private Sub Command1_Click()
Clipboard.Clear
Clipboard.SetText rtbfocus
End Sub
Private Sub RichTextBox1_GotFocus()
rtbfocus = RichTextBox1.Text
End Sub
Private Sub RichTextBox2_GotFocus()
rtbfocus = RichTextBox2.Text
End Sub
Private Sub RichTextBox3_GotFocus()
rtbfocus = RichTextBox3.Text
End Sub