Read and write from/to registry in VBA
I think the problem here was that the macro did not have permission to write to the registry. More information in this page. I could read the key’s value using the WScript object just fine: Debug.Print CreateObject(“WScript.Shell”).RegRead(“HKLM\SYSTEM\CurrentControlSet\Services\USBSTOR\Start”) To write (it should work if you have permissions): CreateObject(“WScript.Shell”).RegWrite “HKLM\SYSTEM\CurrentControlSet\Services\USBSTOR\Start”, 4, “REG_DWORD” How I got it to … Read more