I can toggle the internet proxy on Internet Explorer by going to Internet options
> Connections
> LAN settings
> Proxy Server
> Use a proxy server for your LAN
.
When I do that it toggles the registry key HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable
.
The problem is that it's not just that because when I change the value manually with regedit
it doesn't toggle the proxy nor the proxy option on IE.
I'm trying to be able to toggle it from Excel with VBA code.
Private Sub DisableProxy()
Dim Shell As New WshShell
Shell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable", 0, "REG_DWORD"
End Sub
I tried using a program to monitor registry changes but it only shows that one key.
How can I toggle the proxy correctly from Excel VBA?