Bill,
Check
Re: How to end a copy on Excel Message #
958988>I have automated Excel to paste VFP data from the clipboard. I want to drop 47 records in 5 columns at the 7th row and then paste 47 more records in 5 columns starting at the 7th row and keep doing this until I run out of data.
>
>I have a do while loop that solves the problem but there is an ugly array that I have to create in code to define the column letters for the beginining and end of each range. I can get a set of 47 records by putting an SQL command with a Between(counter,startnum,endnum) condition at the top of the loop.
>
>Could anybody take a crack at making the array in an algorithm instead of having to hard code it??
>
>Here is the beginning of the array. The trick is to go through the alphabet and then begin using the AA, AB, AC format.
>
<snip>
>
>Or suggestions for a better way than hardcoding the ranges with the Range Function i.e. oExcel.range(the current top left column +"7:"+top right col+"7")
>
--sb--