Answers for "excel vba write to the windows registry"

VBA
2

excel vba write to the windows registry

'VBA function to WRITE to the Windows Registry:

Public Sub RegSave(Key$, valType$, Val$)
    With CreateObject("wscript.shell")
        .RegWrite Key, Val, valType
    End With
End Sub

'NB: Always backup the Windows Registry before accessing it!
Posted by: Guest on April-30-2020
3

excel vba read registry key value

'VBA function to READ from the Windows Registry:

Public Function RegRead(Key$) As String
    On Error Resume Next
    With CreateObject("wscript.shell")
        RegRead = .RegRead(Key)
    End With
    If Err Then Err.Clear
    On Error GoTo 0
End Function

'NB: Always backup the Windows Registry before accessing it!
Posted by: Guest on April-30-2020

Code answers related to "VBA"

Browse Popular Code Answers by Language