Array problem

  • Thread starter Thread starter ub
  • Start date Start date
U

ub

Hi

In my code, I am storing the data of the worksheet in an array and then
trying to paste the array into another worksheet. But the data in of the
columns has text for about 600 characters. I am able to paste the array into
another worksheet. But the column that has text character does gets cut off
after few hundered rows.

My data set is as follows
Column A Column b Column C Column D


Has data Has Numeric has numeric Has text
with approx
Y/N data data
600 Charcters

My code is
********************
Dim kary As Variant

kary = ActiveWorkbook.Worksheets("Sheet1").Range("a2", "d2000").Value

Worksheets("Sheet2").Range("a2").Resize(UBound(kary, 1), 4).Value = kary

**************

Data in coulmn D only gets pasted for few hunderd rows.

Is there some problem is defining the array. Or is there a better way to
accomplish my task. I don't want to use copy and paste function
 
ub,

Not sure if Sheet2 is meant to be in the Activeworkbook or not. If it is, then:

Worksheets("Sheet2").Range("A2:D2000").Value = Worksheets("Sheet1").Range("A2:D2000").Value

HTH,
Bernie
MS Excel MVP
 
Back
Top