View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Mysteriously terminating code

Where is the range "EnterJob" located. If on sheet Jobs, then try putting a
period in front of
Range("EnterJob")

I assume this code is in a sheet module. If so, the unqualified Range
reference refers to the sheet containing the code.

--
Regards,
Tom Ogilvy

wrote in message
ups.com...
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