View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
kkknie[_113_] kkknie[_113_] is offline
external usenet poster
 
Posts: 1
Default Building/Creating an Array

This will get you started.

Code
-------------------
Sub test()

Dim w As Worksheet

For Each w In ActiveWorkbook.Worksheets
If Left(w.Name, 3) = "MKT" Then

'Do something to populate an array

End If
Next

End Su
-------------------

You will have to be more specific as to what you mean by populating a
array (what will it be used for, where will the data come from).

As to how to know how many items are in an array, that is difficult t
say. If you mean that you dimensioned an array like:

Dim strArray(100) as String

and want to get how many non-blanks are in it, you would just do this:

For i = 0 to 100
If strArray(i) = "" then Exit For
Next

iArrayLenght = i -1

Post back with more detail.



--
Message posted from http://www.ExcelForum.com