Solved

Change HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable

Posted on 2003-11-07
4
1,155 Views
Last Modified: 2010-08-05
Hi,

I need to change this registry key in VBA using a command button? HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable

Any thoughts?

Chris
0
Comment
Question by:archer1050
  • 2
4 Comments
 
LVL 39

Expert Comment

by:stevbe
Comment Utility
you could shell a .reg file or try this code out ...

http://www.mvps.org/access/api/api0015.htm

Steve
0
 
LVL 4

Expert Comment

by:inox
Comment Utility

you can use

    Dim objWSH As Object    
    Set objWSH = CreateObject("WScript.Shell")
    objWSH.RegWrite "HKLM\Software\MyApplication\strValue", "Some string value"

you also can use the
GetSetting, SaveSetting functions:
GetSetting(appname, section, key[, default])
but they are linited to the HKEY_CURRENT_USER key, sufficient for your request
0
 

Author Comment

by:archer1050
Comment Utility
The value is a dword value, will this function still work?
0
 
LVL 4

Accepted Solution

by:
inox earned 125 total points
Comment Utility

with
objWSH.RegWrite "HKLM\Software\MyApplication\key1", 1234, "REG_DWORD"

you can write integers and read also
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now