You can use the FormattedValue attribute to query the value of the variable formed using the “Format” variable property.
Syntax | ||||
FormattedValue([LanguageID][, Format]) | ||||
Return value | ||||
Type |
Description | |||
String |
The formatted value of the variable | |||
Parameter | ||||
Use |
Name |
Type |
Passing |
Description |
Optional |
LanguageID |
String |
ByVal |
Language-ID of the value |
Optional |
Format |
String |
ByVal |
Format-specification if a different formatting is desired than specified in the variable properties |
Note | ||||
The attribut is read-only. If LanguageID and Format are not specified, FormattedValue returns the format of the current dialog language. |
Example 1:
Define a variable named Len of type Long with the following fomat:
Len := 1000
MsgBox(Len.FormattedValue)
Example 2:
Define a local variable named Len of type Long:
Dim Len As Long
Len := 1000
MsgBox(Len.FormattedValue(, "0.00 \m\m"))
The output of both examples is:
1000.00 mm
See also Format