|
-
Nov 4th, 1999, 04:35 AM
#1
Thread Starter
Junior Member
ok, the code you gave me for copy was..
SendKeys "^C", 1 'Copy
now how do i use this?
I have a textbox named Text1. And a command button named Command1. Now, if u can tell me how to code, so when i click the command button, it takes whats inside the textbox, and copies it. How do i do it? Thanks.
-
Nov 4th, 1999, 04:43 AM
#2
Method1:
Code:
Private Sub Command1_Click()
Clipboard.SetText Text1.SelText
End Sub
Method2:
Code:
Private Sub Command1_Click()
Text1.SetFocus
SendKeys "^C", 1
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
-
Nov 4th, 1999, 04:43 AM
#3
Fanatic Member
Put this codes into Click Event of a appropriate CommandButton:
Code:
Private Sub cmdCopy_Click()
Clipboard.SetText Text1.SelText 'Copies only selected text
'change Text1.SelText to Text1.Text if you want to copy whole TextBox
End Sub
Private Sub cmdCut_Click()
Clipboard.SetText Text1.SelText
Text1.SelText = ""
End Sub
------------------
Visual Basic Programmer
-----------------
PolComSoft
You will hear a lot about it.
[This message has been edited by QWERTY (edited 11-04-1999).]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|