INIFile: GetDecimal


Returns a Decimal value from the specified key in the specified section of an INI file.

 Public Function GetDecimal(
	  ByVal Section As String,
	  ByVal Key As String,
	  Optional ByVal Default As Variant ) As Variant


[ByVal] String. The section within the INI file to search for the key.
[ByVal] String. The key in the section of an INI file to retrieve the value of.
[ByVal] Optional. Variant. The default value to return if the key is not found in the section, or the value could not be converted to a Decimal.

Return Values

Variant - 


An INI file contains all values as Strings. The value is converted back into a Decimal using the CDec function. If an error happens, then the default is returned.

See Also

Project VBCorLib Overview Class INIFile Overview INIFile Properties INIFile Methods GetDateTime GetDouble