View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
musa.biralo musa.biralo is offline
external usenet poster
 
Posts: 55
Default Why not working? Array Problem.

Private Sub CommandButton1_Click()
Dim AbcID(1 To 100) As String
Dim iAbc As Integer
Dim AbcSheetName(1 To 100) As String

For iAbc = 1 To 10
AbcID(iAbc) = 5
''AbcID(iAbc) = Sheets("Data").Range("D" & iAbc + 5).Value
''AbcSheetName(iAbc) = Sheets("Data").Range("E" & iAbc + 5).Value
Next iAbc

End Sub

I was expecting AbcID(1), AbcID(2), ......

But it is always AbcID(iAbc), AbcID(iAbc)why...

Please help me....

Thanks
musa.biralo