Works perfectly now.
Don't forget (if you haven't done it already), the version from MarkCW's post contains two other errors that Grey Alien mentioned (two 0's that should be Null).
Don't forget (if you haven't done it already), the version from MarkCW's post contains two other errors that Grey Alien mentioned (two 0's that should be Null).