>hey,
>
>can U be more explicit on the copy a string to clipboard sollution. Could u please pass an example to us all?
>
>Thanks,
>ionut
1) Build a string and "Copy" in VFP, 2) "Paste" in Excel.
Step 1: Build string. Separate cells horizontally with tab characters; vertically with end-of-line symbols.
MyString = "Cell A1" + chr(9) + "Cell B1" + chr(13) + chr(10);
+ "Cell A2" + chr(9) + "Cell B2"
Copy to clipboard:
_ClipText = MyString
Step 2: Use Automation to locate a certain cell, and give the "Paste" command in Excel. I think you can find out the exact commands by yourself: saving a macro in Excel should give you the approximate syntax.
Note that a value like "0035" will be pasted as the number "35". If you want to avoid this, you have to format the Excel range before pasting.
HTH,
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)