Encontrei a solução:
Function FillSpace(nPar As Variant, nOccurs As Integer, L_R As Boolean) As String
Dim nSize As Integer
Dim nParticle As String
Let nSize = Len(Trim(nPar))
' Informa se será preenchido na frente (LEFT) ou atrás (RIGHT).
If L_R Then
Let nParticle = Space(nOccurs - nSize) & Trim(nPar)
Else
Let nParticle = Trim(nPar) & Space(nOccurs - nSize)
End If
Let FillSpace = nParticle
End Function
'FillZeros((valorrs), 15, True)
Postado : 15/04/2015 4:43 am