Kenneth,
Thanks for the post. I tried out your code and it does not perform the task I need. A text file appears declaring "Hello World", and it is something I can't use. I'll try explaining it a different way. The code below works perfectly:
[VBA]
Sub testme()
Dim MyDataObj As DataObject
Set MyDataObj = New DataObject
MyDataObj.SetText ActiveCell.Text
MyDataObj.PutInClipboard
End Sub
[/VBA]
The only problem with it is that it does not copy a range of cells (i.e. K1 thru K20). It is only able to copy the data from a single cell such as K1. What I need added to the code above is some code that will enable it to copy a range of cells.
If you can do that I would be very grateful.
Each cell within the cell range of K1 thru K20 contains three text strings that look like this:
HTML Code:
PART # 30022
Part Description goes in this line
Manufacturer info goes in this line
I'm getting three lines of text within each cell by using the Char(10) carraige return code within my concatenate function:
[VBA]
=CONCATENATE(A22,B22,C22,CHAR(10),D22,E22,F22,CHAR(10),G22,H22,I22,CHAR(10) )
[/VBA]
The Char(10) works great within Excel. But once you copy a single cell containing three text strings and paste it to NotePad++ or NotePad, the CHAR(10) carriage returns convert to quotes. I want the quotes deleted and the Macro above does a great job of deleting the quotes before it puts it into the clipboard. But as I mentioned it only works on a single cell selection basis. I need the macro modified so it can handle copying from a selected cell range. If you can make this modification to the macro, I would be very grateful. Many Thanks.