Results 1 to 2 of 2
2004-06-13, 10:51 #1
- Join Date
- May 2002
- Dubai, UAE, United Arab Emirates
- Thanked 0 Times in 0 Posts
Copy to Clipboard as Text (Excel XP)
I have a spreadsheet that is used to generate a text string based on a set of variables. The user enters/selects various parameters, then looks at the generated name, then enters that name into another application. I would like to use copy and paste, but when I use paste in the destination application (Ctrl-V) I get an error. I discovered that if I copy in excel, then paste into notepad, then copy that text, then paste into the destination application, it works. Thus I think the problem is that excel is copying the cell as a cell, and the destination application is not able to convert this to text.
So I would like a function in excel that I can click on or use a keyboard combination that will copy the string text equivalent onto the windows clipboard. I took the following code from a previous post, but it generates an error:
Dim objTemp As New DataObject
Dim strText As String
strText = ActiveCell.Text
Set objTemp = Nothing
The error is "User Defined Type Not Defined" and highlights "objTemp As New DataObject"
I've played but can't remember how to define objects in excel. Perhaps I'm, missing a library reference.
Any assistance would be most appreciated.
Thanks, Regards Ken.
2004-06-13, 10:53 #2
- Join Date
- Mar 2002
- Thanked 28 Times in 28 Posts
Re: Copy to Clipboard as Text (Excel XP)
Also asked - and answered - in <post#=380841>post 380841</post#>.
To avoid duplication and confusion, I am locking this thread.