📜  excel vba 写入 windows 注册表 - VBA 代码示例

📅  最后修改于: 2022-03-11 14:51:56.398000             🧑  作者: Mango

代码示例2
'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!