?
Solved

Copy and Paste

Posted on 2003-03-20
6
Medium Priority
?
199 Views
Last Modified: 2010-05-01
Hi everyone, I have a rich text box and I'm using this to copy the formated text:

    Clipboard.SetText rtb1.TextRTF, vbCFRTF
the problem is when I past, all rtf codes come up!
I'm using:
rtb1.SelRTF = Clipboard.GetText

how do I do this?
0
Comment
Question by:igfp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 4

Expert Comment

by:trkcorp
ID: 8176907
try on 2cd line:
rtb1.TextRTF = Clipboard.GetText(vbCFRTF)
0
 
LVL 4

Expert Comment

by:trkcorp
ID: 8176958
OR
rtb1.SelText = Clipboard.GetText(vbCFRTF)
0
 

Author Comment

by:igfp
ID: 8177332
yep it works but i've got another prob now. When I press CTRL + V it gives me the formated text but twice! It shows twice.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:cyberknet
ID: 8177560
be sure to clear the clipboard before you place any data on it. If you don't you run the risk of very strange things happening.
0
 
LVL 4

Accepted Solution

by:
trkcorp earned 80 total points
ID: 8180949
cyberknet is right.  Do a Clipboard.Clear before storing anything, otherwise you will append.
0
 

Author Comment

by:igfp
ID: 8183665
Thank you both, it works fine now, both functions!!! Points go to him for he helped the first one!
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question