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

any way ro copy from an unbound, hidden text box??

Status
Not open for further replies.

Chummly66

MIS
Feb 19, 2005
106
US
What I mean is this...

I have an unbound text box that is hidden on a form called txtcaresMemo. What I am doing is on a click of a button, I am selecting certain data on my form and stringing it together and placing it into the unbound text box called txtcaresMemo. What I then want to do is paste the combined data into the clipboard to open another app in which I would paste my data; saves on the retyping.

But I cant set focus to it since its not visible, and its not a box I need to save the data once I pasted the data into my other app so I dont need anything but an unbound text box.

Any ideas about getting the now stringed data into the clipboard without having this text box visible and without being able to set focus to it?

thanks guys

Richard
 
The idea that comes to mind when looking at this is write a macro that:

1) Unhides the box
2) sets focus to the box
3) runs your copy macro
4) moves the focus
5) hides the box.

This is NOT the best way of doing it, but -- it seems to me like it would work for you.

Randall Vollen
Merrill Lynch
 
hey randall,

thanks for the reply. I know its not the best, but it works great kin my situation. Mucho Appreciato!

Richard
 
You don't need to make it visible or set focus to the hidden text box. In the code for the button click use:

Me.yourTextBox = strYourData

Hope this helps?
 
jklo,

But the issue afterwards is I need to set focus to Me.yourtextbox to copy the content to the clipboard. And you cant do that unless its visible and you can set focus to it.

ANyways, I just left the text box visible, just set the background and foreground colors same as the color of my form.

thanks!!
Richard
 
OK. I understand your problem better now.
hwkranger's suggestion will probably work then.
Use Sendkeys to copy to the clipboard.
 
How are ya Chummly66 . . .

Have a look here: API: Copy variables/control contents to memory

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top