Clayton Scott read my post on skipping blank lines (also known as blank tasks) in project by using the statement
If Not Task is Nothing Then...
He suggested that rather than using a negative that we use:
If Task is Nothing Then
Next Task
End If
but the problem is that the Next Task
within the If..Then
statement is not recognized correctly by the compiler and the code won't compile. Clayton's intent was to simplify the code and remove the confusing Not
from the statement. I think it is possible to remove the Not
but this would require implementing a counter of some sort or using Onerror, both of which would not lead to greater simplicity.
So it looks that for the time being we are stuck with using If Not Task is Nothing
.
I'd like to say thanks to Clayton for trying to point out possible improvements though. Comments are always welcomed.