Re: array help needed
- From: "Rick Rothstein" <rick.newsNO.SPAM@xxxxxxxxxxxxxxxxxx>
- Date: Sun, 2 Nov 2008 12:36:17 -0500
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" <Rivers@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:6D53B28E-4D14-4DD4-9F30-E8298A4D3CEB@xxxxxxxxxxxxxxxx
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/showthread.php?t=24240
.
- Follow-Ups:
- Re: array help needed
- From: ShaneDevenshire
- Re: array help needed
- References:
- array help needed
- From: Rivers
- Re: array help needed
- From: shg
- Re: array help needed
- From: Rivers
- array help needed
- Prev by Date: Re: Refer to first cell in range
- Next by Date: Re: Refer to first cell in range
- Previous by thread: Re: array help needed
- Next by thread: Re: array help needed
- Index(es):
Relevant Pages
|