To add an item to the array you would have to ReDim the array and use "Preserve" to keep the values:
Code:Dim strCode As String Dim topVar As Integer Dim i As Integer Dim YourNum as Integer For i = 1 To YourNum topVar = UBound(strCode)+1 ReDim Preserve strCode(topVar) As String strCode(topVar) = "This is the last item in the array" Next




Reply With Quote