-
I want to get select text from IE HTML page to my VB variable .( I use Internet Explorer Control )
When I double click or drag to select text on the HTML page. So it made select text appear on the page and mouse icon become to arrow. And then I want to send that select text to my VB variable , I know it same as right click to copy select text but I don't to copy.
-
Add this code to a Timer and set it's interval to 1:
Code:
Private Sub Timer1_Timer()
x = Clipboard.GetText()
If x <> "" Then
Text1.Text = x
Timer1.Enabled = False
Exit Sub
Else
End If
End Sub
Make sure you clear the clipboard when first loading your form.
Code:
Private Sub Form_Load()
Clipboard.Clear
End Sub