"One way in, one way out" is good practice, but error code is generally recognized as an exception.
This code violates "one way in, one way out", but could one think of it as a user generated error?
If MsgBox("Continue?", vbYesNo) = vbNo Then Exit Sub
One other reason that one sees code like that on the forum is that that lay out hightlights the point of the post.
If Target.Cells.Count <> 1 Or Target.Column <> 1 Then Exit Sub
' code to handle one cell
highlights the code to handle one cell. Burying it in machinery isn't as educational. (IMO)
Dim oneCell as Range
For each oneCell in Applicaiton.Intersect(Columns(1),Target)
'code to handle one cell
Next oneCell
Bookmarks