Function FormatNumericDecimal(dblOriginal As Double ,intDecimalLength As Number,Optional bolShowAmountSeparate As Boolean=True) As String
dim strNumber As String
If bolShowAmountSeparate Then
If intDecimalLength=0 Then
strNumber=CStr(dblOriginal,"###,###,###,###",0)
Else
strNumber=Replace(CStr(dblOriginal,"###,###,###,###.##########",intDecimalLength)," ","")
End If
Else
If intDecimalLength=0 Then
strNumber=CStr(dblOriginal,0)
Else
strNumber=Replace(CStr(dblOriginal,"#.##########",intDecimalLength)," ","")
End If
End If
FormatNumericDecimal=strNumber
End Function