Ignore that last post. It'll work if you want to save or retrieve a setting for
your VBA program--but it's not used for accessing the registry in general:
Option Explicit
Sub testme()
Dim wsh As Object
Dim RegStr As String
Dim RegVal As String
RegStr = "HKLM\Software\Microsoft\mediaplayer\" _
& "settings\mp3encoding\PreferredCodecName"
Set wsh = CreateObject("WScript.Shell")
RegVal = "not found!!!!"
On Error Resume Next
RegVal = wsh.RegRead(RegStr)
On Error GoTo 0
If RegVal = "not found!!!!" Then
MsgBox "key wasn't found"
Else
MsgBox RegVal
End If
End Sub
wrote:
I have a list of servers in excel and I would like to access a few
registry setting on each server and write that value to other column.
Can anyone help with this? I do not need to write to the registry,
just read.
Thanks in advance
--
Dave Peterson