' Format a value ' expC1 Separator ' expN2 Number of decimals Public Function GetFormat(ByVal tcSeparator As String, ByVal tnDecimal As Integer) As String Dim lcFormat As String = "" Dim lnCounter As Integer = 0 ' Obtain formatted value For lnCounter = 1 To 9 lcFormat = "#" + lcFormat If lnCounter Mod 3 = 0 Then lcFormat = tcSeparator + lcFormat End If Next lcFormat = lcFormat + "0" ' If we have decimals If tnDecimal > 0 Then lcFormat = lcFormat + "." + "".PadRight(tnDecimal, "0") End If Return lcFormat End Function ' Format a value for a dollar ' expN1 Value ' expC1 Separator Public Function GetFormatValueDollar(ByVal tnValue As Double, ByVal tcSeparator As String) As String Dim lcFormat As String = "" Dim lcValue As String = "" Dim llDollarSignToTheRight As Boolean = True lcFormat = GetFormat(tcSeparator, 2) lcValue = Format(tnValue, lcFormat) + "$" ' If we format the dollar sign as per the language If oApp.lFormatDollarAsPerTheLanguage Then ' Based on the language Select Case nLanguage ' English Case 1 lcValue = "$" + Format(tnValue, lcFormat) ' French Case 2 lcValue = Format(tnValue, lcFormat) + "$" ' Spanish Case 3 lcValue = Format(tnValue, lcFormat) + "$" ' Portuguese Case 4 lcValue = Format(tnValue, lcFormat) + "$" End Select End If Return lcValue End Function