Matrik
As LaVolpe mentioned, you very nicely described the process
in your "manual calculation" list of steps.
Maybe something along these lines will give you a booster start ...
SpooCode:Dim nDecDeg as Double Dim nDeg as Integer Dim nMin as Integer Dim nSec as Integer Dim txtDeg as String ' nDecDeg = 42.36824 ' 1. deg nDeg = Int(nDecDeg) ' 42 v1 = nDecDeg - nDeg ' .36824 v2 = v1 * 60 ' 22.0944 ' 2. min nMin = Int(v2) ' 22 v3 = v2 - nMin ' .0944 v4 = v3 * 60 ' 5.664 ' 3. sec nSec = Int(v4) ' 5 v5 = v4 - nSec ' .664 ' 4. rounding nSec = nSec + IIf(v5 >= 0.5, 1, 0) ' 5 + 1 = 6 ... rounded up ' 5. create string with leading 0's if number is < 10 txtDeg = Format(nDeg, "00") + " deg., " _ & Format(nMin, "00") + " min., " _ & Format(nSec, "00") + " sec. "




Reply With Quote