View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Reg Besseling Reg Besseling is offline
external usenet poster
 
Posts: 4
Default Excel skip some lines of VBA code

Name your sheetfully i.e. workbook.sheet
"Alex" wrote in message
...
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