Hi Richard,

There are a few glitches in Oshonsoft, and queries are usually not answered, so I just work with what's there. I tried a few combinations of OR IF THEN ELSE ETC, but no compile.

If I say the answer to my question is:
If poscnt < azimval Then
If azimval - poscnt >= 180 Then
Gosub ccwise
counter = 0
Else
Gosub cwise
counter = 0
Endif
Endif
You may notice that I had asked the wrong question I have more difficulty than I should have with lines like: (If azimval - poscnt >= 180 Then) so things take 50 times as long as they should. Anyway It's working now.

Thanks and HAPPY NEW YEAR.

C.