Registry entries

Posted on 2003-11-17
Last Modified: 2010-05-01
Could someone please explain how to read and write to the registry? I would like to be able to save various settings in the registry. I am creating a program that will need to be run on both win2000 and winXP systems. I have read the msdn entries and tried using the getsetting() and savesetting() functions, but cant find where they actually get saved to!

many thanks,
Question by:Ice123
  • 2
LVL 50

Expert Comment

by:Ryan Chong
ID: 9762959
Basically, SaveSetting saved the values into registry: HKEY_CURRENT_USER\Software\VB and VBA Program Settings, to make it more flexible, you must using the existing Registry APIs. Take a look on the links below and try find useful examples

Hope this helps

Expert Comment

ID: 9762968
They are saved in "My Computer\HKEY_CURRENT_USER\Software\VB and VBA Program Settings".

When saving a setting, you enter the appname, which will be the folder the settings go into.
When useing getsetting you only have to fill in the appname and not the entire registry key
LVL 11

Accepted Solution

bmatumbura earned 50 total points
ID: 9763343
Also have a look at this Registry Access Class I posted at:
LVL 11

Expert Comment

ID: 9769605

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question ( in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

813 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

14 Experts available now in Live!

Get 1:1 Help Now