Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to return Array() to range as variable?
The following does what I want:
Sub testit() Range("b2:d2") = Array(21, 22, 23) End Sub But I would prefer to use a variable instead of Range("b2:d2"). (Part of a larger macro.) Why doesn't the following work? More importantly, how can I make it work? Sub testit() Dim rng Set rng = Range("b2:d2") rng = Array(21, 22, 23) End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Return a range based on a variable | Excel Worksheet Functions | |||
Return actual range not cell value in variable | Excel Worksheet Functions | |||
Return a value if variable is in a range | Excel Discussion (Misc queries) | |||
can .range return a 1D array? | Excel Programming | |||
Problem trying to us a range variable as an array variable | Excel Programming |