How to copy just the text from a textbox to the clipboard in VBA (MSO 2000 - Excel). I can copy the entire textbox but I only want the text (not the box).
My brain has gone to sleep and I can't do it :( can in VB but do not want to reference VB components.
Cheers.
NM

Copy text from textbox to clipboard?
Mahesh Srirangam
Emergency over.. created the text as a dataobject and used PutInClipboard.
Not enough caffeine yet this morning!!
dougua
I have the same emergency.
Could you post the code snippet you used please.
I can't find any reference to "PutInClipboard"
GinaK
Graham, reference to PutInClipboard is here: http://msdn.microsoft.com/archive/default.asp url=/archive/en-us/office97/html/output/F1/D6/S5B40E.asp. I haven't used this function so I can't vouch for it. I suspect it's deprecated by now and you're probably safer using the API. Check http://msdn.microsoft.com/library/default.asp url=/library/en-us/winui/winui/windowsuserinterface/dataexchange/clipboard.asp for information on API functions that deal with the clipboard.