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
Post a Comment