Registry: GetValue

GetValue

Returns a value from the registry key.



 Public Function GetValue(
	  ByRef KeyName As String,
	  ByRef ValueName As String,
	  Optional ByRef DefaultValue As Variant ) As Variant

Parameters

KeyName
[ByRef] String. The full registry key name that contains the value.
ValueName
[ByRef] String. The name of the value in the registry key.
DefaultValue
[ByRef] Optional. Variant. The value to return if the registry value does not exist.

Return Values

Variant -  A value from the registry.

Remarks

A full registry key name must include the root level key.

 v = Registry.GetValue("HKEY_CURRENT_USER\Environment\", "TEMP")
 

See Also

Project CorLib Overview

Class Registry Overview