>< %@ LANGUAGE="VBScript" > >< % > >'------------------------------------------------------------------------------- >' expN1 Length for padding >' expN2 Value >' expN3 Number of decimals >'------------------------------------------------------------------------------- >Function Format(tnLength,tnValue,tnDecimal) >lcValue=CStr(tnValue) >lnPosition=InStr(lcValue,".") >If lnPosition=0 Then > lcFormat=Space(tnLength-Len(lcValue)-1-tnDecimal)+FormatNumber(tnValue,tnDecimal) > Else > lcFormat=Space(tnLength-lnPosition-tnDecimal)+FormatNumber(tnValue,tnDecimal) >End If >Format=lcFormat >End Function > > >'------------------------------------------------------------------------------- >' Only used to insert spaces where applicable as per the alignment and the font >'------------------------------------------------------------------------------- >Function Space(tnLength) >lcString="" >For lnCompteur=1 To lnField > lcString=lcString+" " >Next >Space=lcStringShould it be For lnCompteur=1 To tnLength? I'm going to use "AddSpaces" name for the function. Also, do you have Option Explicit? Why you don't declare variables? And I believe, we have space function in VB?