Mysteriously terminating code
The following code is snipped from a worksheet_change event sub:
With Sheets("Jobs")
Stop
If target.row = Range("EnterJob").row Then .Cells(target.row, _
JobBook.JOBS_DateIn).Value = Format(Date, "mm-dd-yy")
Stop
End With
I put the stops in while debugging. The program hits the first stop, I
click continue, then it just seems to flow somewhere else. The
assignment to .Cells(target.row, JobBook.JOBS_DateIn).value is never
carried out, and the second Stop is never reached... I am utterly
baffled. It works fine in Excel 2000. This bug is showing up in Excel
2002, but I am pretty sure this section of code *was* working fine a
week ago. I tried commenting out that line, but the same thing happens
with the next line instead... Huh?
Iain
|