Sub montpresnew( mt0 As String, lg As String) As String
montpresnew = ""
Try
Dim y As String:y = "":Dim mystr As String:mystr = "":Dim mt As String:mt = ""
mt = mt0
If mt.Length <= 5 Then
montpresnew = mt.Substring2(0, mt.Length - 2) & signdec(lg) & mt.Substring2(mt.Length - 2)
Else If mt.Length > 5 AND mt.Length <= 8 Then
montpresnew = mt.Substring(0, mt.Length - 5) + signmille(lg)
y = mt.Substring(mt.Substring(0, mt.Length - 5).Length)
montpresnew = montpresnew & y.Substring2(0, y.Length - 2) + signdec(lg) + y.Substring(y.Length - 2)
'Else
'taille supèrieure à 8
End If
Catch
montpresnew = "0000"
End Try
End Sub