It's not as bad as that Doc, is it ? :)
' Function generates next code in sequence
' to a passed argument in the form of
' ZZ-000001-0001
Public Function GenInvCode(gnIN As String) As String
Dim oo As Variant, a As Long, b As Long, pfx As String, om As String
pfx = Left(gnIN, 2)
a...