Solved

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

Posted on 2004-05-02
1
167 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
ID: 10971637
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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

773 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