Registry: SetValue

SetValue

Sets a value to a registry key, creating it if it does not exist.



 Public Sub SetValue(
	  ByRef KeyName As String,
	  ByRef ValueName As String,
	  ByRef Value As Variant )

Parameters

KeyName
[ByRef] String. The full registry key name to write the value to.
ValueName
[ByRef] String. The name of the value to be written in the key.
Value
[ByRef] Variant. The value to be written in the key.

Remarks

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

 Registry.SetValue "HKEY_CURRENT_USER\Environment\", "MyValue", "Hello"
 

See Also

Project CorLib Overview

Class Registry Overview