FormatPercent Function (Visual Basic)
Returns an expression formatted as a percentage (that is, multiplied by 100) with a trailing % character.
Function FormatPercent( ByVal Expression As Object, Optional ByVal NumDigitsAfterDecimal As Integer = -1, Optional ByVal IncludeLeadingDigit As TriState = TriState.UseDefault, Optional ByVal UseParensForNegativeNumbers As TriState = TriState.UseDefault, Optional ByVal GroupDigits As TriState = TriState.UseDefault ) As String
|
Exception type |
Error number |
Condition |
|---|---|---|
|
Type is not numeric. |
See the "Error number" column if you are upgrading Visual Basic 6.0 applications that use unstructured error handling. (You can compare the error number against the Number Property (Err Object).) However, when possible, you should consider replacing such error control with Structured Exception Handling Overview for Visual Basic.
When one or more optional arguments are omitted, the values for omitted arguments are provided by the locale settings.
Note:
|
|---|
|
All settings information comes from the locale of the application. By default, that will be the locale set in the control panel. However, it may be changed programmatically by using the .NET Framework. |
Namespace: Microsoft.VisualBasic
Module: Strings
Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)
Note: