VBA assign a range to an Array from different sheet -


i have 2 different sheets , have assign 2 ranges these 2 sheets 2 different array problem can not specify sheet before range e.g

dim flarr() variant  flarr = sheets("xxx").range(a1:a10) 

this gives me error. workaround?

thanks

look @ differences between code , mine. remove parenthesis after variant variable, let excel figure out array. need include range in quotations , specify want values range.

dim flarr variant flarr = sheets("xxx").range("a1:a10").value 

hope helps :)

you less common construction this, awkward.

dim arr() variant redim arr(1 10) arr() = sheets("xxx").range("a1:a10").value 

hope helps


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -