Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Textboxes – copy text from one to another.

Status
Not open for further replies.

Mollethewizard

IS-IT--Management
Nov 18, 2002
93
SE
First let me describe my ”problem”. I’ve got a user form with various textboxes. Let’s say that a user enters text in one of the boxes and then copies it to the clipboard using the short command ctrl+c. Is there a way to programmatically copy the copied text to one of the other textboxes just by clicking, let’s say right click in it? Or can one use some sort of short command by ctrl (alt or shift or a combination) + an F-key?

Christer
 
Mollethewizard,

You can use the Exit event to copy the text over;

Private Sub txtText1_Exit()

txtText2.Value = txtText1.Value

End sub

Hope this helps.


Leigh Moore
Solutions 4 MS Office Ltd
 
Both your suggestions work but it wasn't what I wanted in this case.

I'll be back whit a more specific question later.

But thanks anyway.

Christer

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top