By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,805 Members | 1,350 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,805 IT Pros & Developers. It's quick & easy.

rich text box cut

P: 17
how can I do the cut copy and paste in the rich text box
of visual basic 6.0

for cut I use
Expand|Select|Wrap|Line Numbers
  1. Private Sub mnucut_Click()
  2. Clipboard.Clear
  3.  
  4. rtb.SelText Clipboard.GetText
  5. rtb.SelText = " "
  6.  
  7. End Sub
but it not running properly
Mar 31 '07 #1
Share this Question
Share on Google+
3 Replies


Expert 5K+
P: 8,434
I think your code look alright, except...
rtb.SelText Clipboard.GetText
What is this line supposed to do? Does it even compile?

(It looks to me as though you have your cut/paste operations jumbled up here.)
Apr 1 '07 #2

P: 17
I think your code look alright, except...
rtb.SelText Clipboard.GetText
What is this line supposed to do? Does it even compile?

(It looks to me as though you have your cut/paste operations jumbled up here.)

please tell me what is the right code
Apr 8 '07 #3

Expert 5K+
P: 8,434
please tell me what is the right code
As I said, I think you were pretty close.

Try this (I haven't tested it)...
Expand|Select|Wrap|Line Numbers
  1. Private Sub mnucut_Click()
  2.   Clipboard.Clear
  3.   Clipboard.SetText rtb.SelText, vbCFText
  4.   rtb.SelText = ""
  5. End Sub
Apr 9 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.