[CODE]
' Works with max &hfffffffff for Value/ToSub (and output Value)
Public Sub UIntSubUInt(ByRef Value As Long, ByRef ToSub As Long)
  Dim xLong1 As Long
  
  xLong1 = (((Value And &HFF000000) \ &H1000000) And &HFF&) - (((ToSub And &HFF000000) \ &H1000000) And &HFF&) '<- seperate highest 8 bits (1byte)
  Value = (Value And &HFFFFFF) - (ToSub And &HFFFFFF) '<- sub
  xLong1 = xLong1 - Value \ &H1000000 '<- add overflows to seperated higher 8 bits (1byte)
  Value = ((xLong1 And &H7F&) * &H1000000 + (Value And &HFFFFFF)) Or (&H80000000 * (xLong1 \ &H80&))
  '        re-add all but highest bit     / Values (w/o bits just filtered)
  '                                                                   Re-Adding highest bit
  'UIntSubUInt = Value
  End Sub
