IniFile: GetDecimal

GetDecimal

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



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

Parameters

Section
[ByRef] String. The section within the INI file to search for the key.
Key
[ByRef] String. The key in the section of an INI file to retrieve the value of.
Default
[ByRef] 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 - 

Remarks

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

See Also

Project CorLib Overview

Class IniFile Overview