excel - Assigning range to array in VBA -
excel - Assigning range to array in VBA -
i excel info array in vba, following:
dim arr() variant arr = activeworkbook.sheets("sheet1").range("c28:r29")
as run this, type mismatch error 13. thought problem because 1st row (2 rows in total) represents string (header) , 2nd row represents numbers, tried 1 row this:
arr= activeworkbook.sheets("sheet1").range("c28:r28")
to no avail, still same problem.
does know wrong?
regards crouz
it's pretty simple, add together .value
(i discovered trick not long ago , i'm fan! :) )
arr= activeworkbook.sheets("sheet1").range("c28:r28").value2
excel vba excel-vba
Comments
Post a Comment