View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Alex[_7_] Alex[_7_] is offline
external usenet poster
 
Posts: 1
Default Excel skip some lines of VBA code

I have some code
that work in debug mode but not work if i run it normaly
(if i run it normaly
excel enter to the if condition only 1 time)

What can i do with it??


Sub FormatNow()
Dim Grow As Long
For Grow = 4 To 31640
If Sheet1.Range(Cells(Grow, 8), Cells(Grow, 8)).Interior.Color =
12648447 Then
'MsgBox Grow
Sheet1.Range(Cells(Grow, "Z"), Cells(Grow, "Z")).Value =
Sheet1.Range(Cells(Grow, 8), Cells(Grow, 8)).Value
'MsgBox Sheet1.Range(Cells(Grow, "Z"), Cells(Grow, "Z")).Value
End If
Next
End Sub