Thread: Array size
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Array size

Sub tester3()
Dim tempArray(0 To 10)
tempArray(0) = "someValue"
tempArray(1) = "someOtherValue"

MsgBox "TempArray, 0 = " & tempArray(0) & _
vbNewLine & "TempArray, 1 = " & tempArray(1)

End Sub



--
Regards,
Tom Ogilvy


"ten" wrote in message
...
Could anyone please advice me with some Array-help (or
where to find the information):

I need to have an array

I got this far...
Dim tempArray
tempArray = Array() '(or tempArray = Array("")
tempArray(0) = "someValue"
tempArray(1) = "someOtherValue"

And it crash on the tempArray(0) - or on tempArray(1) if I
use tempArray = Array("") - because it's not defined.
However, I don't want to specify the length of my Array,
but have it dynamic. How can I achieve this?

Thx!