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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy Text to Clipboard 1

Status
Not open for further replies.

burgerman

Technical User
Sep 21, 2002
31
0
0
US
How can I copy the contents of a text box to the clipboard?
 
Just execute the following VBA code:

Me.textcontrolname.Setfocus
DoCmd.RunCommand acCmdCopy

At this point the value of the control is now copied to the clipboard.

You can use the following to paste it elsewhere:
me.anothercontrolname.setfocus
DoCmd.RunCommand acCmdPaste

Good luck. Bob Scriver
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top