View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Srikanth Ganesan[_2_] Srikanth Ganesan[_2_] is offline
external usenet poster
 
Posts: 14
Default Assigning a value to an array cell

Hi,

I am trying to assign a value to a specific cell in an array (inside a
For loop). But for some reason this assignment breaks the loop. Here's
the declaration and the For loop:

Dim yrow() As Integer
Dim i As Integer, k As Integer
k = 0
For i = 1 To lrow

If IsNumeric(Cells(i, 2).Value) = False Then
k = k + 1
MsgBox "*"
yrow(k) = i
MsgBox "**"
End If
i = i + 1
Next i
The First message box pops up but not the second. And the For loop is
not continued further (I guess it is broken)Please help.

Srikanth

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!