You show 'add.item loop' in your latest post... exactly what are you
planning to add your array elements to? While the syntax you posted is
incorrect for my guess of a ListBox or ComboBox; however, if that is indeed
what you want to populate, you do not need to load up an array first in
order to do it. Consider this example for a ListBox on a UserForm (same code
for a ComboBox except for the control's name, of course)...
Dim LastRow As Long
With Worksheets("Sheet1")
LastRow = .Cells(.Rows.Count, "BE").End(xlUp).Row
Me.ListBox1.RowSource = "BE6:BE" & LastRow
End With
If my guess was correct and if you have trouble adapting my code, tell us
what control you have, where it is located (UserForm or Worksheet) and, if
directly on a worksheet, which toolbar you got it from.
--
Rick (MVP - Excel)
"Rivers" <(E-Mail Removed)> wrote in message
news:6D53B28E-4D14-4DD4-9F30-(E-Mail Removed)...
> sorry but i donot understand how to use this array.
>
> my cell values store spreadsheet names and i wish to store them all in the
> variable and then call them into a
>
> add.item loop
>
> can you please explain how i can do this a seriously stuck with your
> answer
>
> "shg" wrote:
>
>>
>> Code:
>> --------------------
>> Dim vArr As Variant
>> vArr = Range("BE6", Range("BE6").End(xlDown)).Value
>>
>> --------------------
>>
>>
>> --
>> shg
>> ------------------------------------------------------------------------
>> shg's Profile: http://www.thecodecage.com/forumz/member.php?userid=13
>> View this thread:
>> http://www.thecodecage.com/forumz/sh...ad.php?t=24240
>>
>>