How do I programmatically delete the key:
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/Ratings
Using the DeleteSetting() function?
Printable View
How do I programmatically delete the key:
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/Ratings
Using the DeleteSetting() function?
You Can't. DeleteSetting() Only allows you to alter the
HKEY_CURRENT_USER\Software\VB and VBA Program Settings \
Section
Mr. Smith is correct.
The only way you can programmatically delete the key you have specified is by using an API.
Ok, thanks for the info. Here's what I am up to. I want use Microsoft Word 97's programming capability (VBA) to delete the registry key I mentioned. Can I do that?
Aah, if you are using MS Word then according to http://msdn.microsoft.com/library/de...wdstoreval.asp
I have never used this function and unfortunately this page doesn't state whether you can also delete registry entries, but I suppose you could set them to "" even if you can't.Quote:
You can set and retrieve information from the Windows registry by using the PrivateProfileString property.
The PrivateProfileString property has three arguments: FileName, Section, and Key. To return a setting from the Windows registry, the FileName argument must be an empty string (""). The Section name should be the complete path to the registry key. The Key should be the value in the key specified by Section.
You can also set information in the Windows registry by using the following PrivateProfileString syntax:
System.PrivateProfileString(FileName, Section, Key) = setting
For more info also see http://msdn.microsoft.com/library/de...filestring.asp
Or you could use the RegTools5 dll, which is a nice object wrapper round the registry API.
- gaffa