Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Capturing text in active cell to clipborad (Excel 95)
My Excel programming skill are not very good, so plz excuse my
ignorance. Through an Excel macro, I would like to automate capturing into the clipboard the text in a selected cell. I have tried using Selection.Copy command but the app that will be receiving the copied cell returns an errror message stating that only text can be pasted. I also tried using this code, which I scavenged from http://www.cpearson.com/excel/clipboar.htm: Public Sub PutOnClipboard(Obj As Variant) Dim MyDataObj As New DataObject MyDataObj.SetText Format(Obj) MyDataObj.PutInClipboard End Sub Public Function GetOffClipboard() As Variant Dim MyDataObj As New DataObject MyDataObj.GetFromClipboard GetOffClipboard = MyDataObj.GetText() End Function Public Sub ClearClipboard() Dim MyDataObj As New DataObject MyDataObj.SetText "" MyDataObj.PutInClipboard End Sub However, Excel 95 shows the following as error: Dim MyDataObj As New DataObject Is there a way to get Excel 95 (v 7.0) to perform this task? Thx much. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Capturing a word sequence as part of a text in a spreadsheet cell | Excel Worksheet Functions | |||
Is there a way to change the active cell by a text box? | Excel Discussion (Misc queries) | |||
Capturing Shape Name/Text from OnAction property | Excel Discussion (Misc queries) | |||
Iterating through workbook capturing text | Excel Programming | |||
Selecting Active Cell before Text Import Routine | Excel Programming |