Solved

How do I make a button select and copy all the text in a textbox?

Posted on 2004-05-02
1
165 Views
Last Modified: 2010-05-02
I need a button to select and copy all the text in "finalcode.Text", how can I make it do this?
0
Comment
Question by:neopetzrulez
1 Comment
 
LVL 19

Accepted Solution

by:
Shauli earned 20 total points
Comment Utility
locate a command button on your fotm amd paste this code to its click event:

Private Sub Command1_Click()
Clipboard.Clear
finalcode.SelStart = 0
finalcode.SelLength = Len(finalcode.Text)
finalcode.SetFocus
Clipboard.SetText finalcode.Text, vbCFText
End Sub

S
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now