Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to get text from copied cells through the clipboard and after
reading the text into an array and some manipulation to the text be able to write the new text back to a range of cells. I have written everything except for the part that writes it back and it works fine in the VB editor. But if I try to run the macro (sub) from Tools on the worksheet I get run-time error DataObject:GetText Invalid FORMATETC structure. My code is centered on the following lines: dObj.GetFromClipboard s = dObj.GetText(1) The error occurs on the GetText line. Reference to Microsoft Forms 2.0 Object Library is checked. Again, it works fine from the editor and I am able to Debug.Print the elements of the array without a problem. But if I run the same Macro from the worksheet, then no joy. Any ideas? What if I put the code into a function and just have a the sub procedure making the Call and then writing the results back where I want it? Any help is appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Where does Ms XL store the clipboard ? or where does MS Windowsstore clipboard ? | Setting up and Configuration of Excel | |||
Clipboard empty but still get waring that clipboard is full | Excel Discussion (Misc queries) | |||
Transfer clipboard from Task pane clipboard(office?) content to Excel (windows?) clipboard? | Excel Programming | |||
Restore clipboard from Task pane clipboard content? | Excel Programming | |||
ClearContents or ClearFormats also clears Clipboard. How can I keep the clipboard? | Excel Programming |