Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
arrays
Hi,
I want to work with an array which contains state names (e.g. Dim strStateNames(49) as String). Is there an easy way to fill the array without getting the data somewhere else? For instance: strStateNames(1 To 50) = "Alabama", "Alaska", "Arizona", "Arkansas", etc. instead of: strStateNames(0) = "Alabama" strStateNames(1) = "Alaska" strStateNames(2) = "Arizona" etc. (ugh!) I know I can put the names in a worksheet and then: For i = 0 To 49 strStateNames(i) = ActiveCell.Value ActiveCell.Offset(1, 0).Select Next i But is there an easy way to do this without going somewhere else for the data? Thanks. Dave |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Arrays | Excel Discussion (Misc queries) | |||
Two arrays same? | Excel Discussion (Misc queries) | |||
Arrays | Excel Worksheet Functions | |||
Use of arrays | Excel Worksheet Functions | |||
3D Arrays | Excel Worksheet Functions |