Public Function UnTick(p32)
If (IsNumeric(p32)) Then
UnTick = p32
Else
dash = InStr(p32, "-")
Px_length = Len(p32)
intPx = Left(p32, dash - 1)
intTicks = Right(p32, Px_length - dash)
If (InStr(intTicks, "+")) Then
plus = InStr(intTicks, "+")
tk_length = Len(intTicks)
subticks = Left(intTicks, plus - 1)
UnTick = intPx + subticks * (1 / 32) + 0.5 / 32
Else
If (InStr(intTicks, ":")) Then
colon = InStr(intTicks, ":")
tk_length = Len(intTicks)
subticks = Left(intTicks, colon - 1)
eigths = Right(intTicks, tk_length - colon)
UnTick = intPx + subticks * (1 / 32) + eigths * (1 / 8) * (1 / 32)
Else
UnTick = intPx + intTicks * (1 / 32)
End If
End If
End If
End Function
|