'VBA function to READ from the Windows Registry:PublicFunction RegRead(Key$) AsStringOnErrorResumeNextWith CreateObject("wscript.shell")
RegRead = .RegRead(Key)
EndWithIf Err Then Err.Clear
OnErrorGoTo0EndFunction'NB: Always backup the Windows Registry before accessing it!
'VBA function to WRITE to the Windows Registry:PublicSub RegSave(Key$, valType$, Val$)
With CreateObject("wscript.shell")
.RegWrite Key, Val, valType
EndWithEndSub'NB: Always backup the Windows Registry before accessing it!