LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Get From Clipboard

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where does Ms XL store the clipboard ? or where does MS Windowsstore clipboard ? Subu Setting up and Configuration of Excel 0 May 5th 09 01:20 PM
Clipboard empty but still get waring that clipboard is full Steve Excel Discussion (Misc queries) 0 June 17th 08 09:05 PM
Transfer clipboard from Task pane clipboard(office?) content to Excel (windows?) clipboard? tskogstrom Excel Programming 2 March 6th 07 12:50 PM
Restore clipboard from Task pane clipboard content? tskogstrom Excel Programming 0 January 30th 07 10:48 AM
ClearContents or ClearFormats also clears Clipboard. How can I keep the clipboard? [email protected] Excel Programming 5 December 16th 05 02:30 AM


All times are GMT +1. The time now is 04:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"