Thread: Adding to Array
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone[_2_] Jim Cone[_2_] is offline
external usenet poster
 
Posts: 1,549
Default Adding to Array

Dim PWL As Variant
PWL = Array("Data1", "Data2", "Data3")
ReDim Preserve PWL(0 To 3)
PWL(3) = "Data4"
--
Jim Cone
Portland, Oregon USA
http://www.mediafire.com/PrimitiveSoftware
(free and commercial excel programs)



"Charlotte E."
wrote in message
...
I have an array, which starts out like this:

PWL = Array("Data1", "Data2", "Data3")


Now I would like to add a value to this array?
As if it had started out like this:

PWL = Array("Data1", "Data2", "Data3", "Data4")


How do I add the "Data4" to the original array???


CE