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

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -